How to run server with loopback?

I have access to a Project backend and would like to know how do I make run that project. It uses loopback and when reading the documentation of the loopback, in the statement 4 it says:

Start the web server.

Which command should I use in Ubuntu to start this webserver with loopback?

After running the command npm install -g loopback-cli and trying to run the system with node . or node server.js appears this error in terminal: insert the description of the image here

Author: Tmc, 2017-10-24

2 answers

As mentioned by @Sergio in the comments, just run the following command:

npm install

You can see more information in StackOverflow.

 1
Author: Tmc, 2017-10-24 09:22:45

Loopback is a node-based application that uses packages as dependencies and is controlled via npm. Therefore, the application needs its dependencies to be initialized.

To install the dependencies of an application in NodeJS, you can run the npm install Command, which will install all the dependencies of the application.
Or in case of production, I recommend npm install --production, which avoids installing packages needed only for dev.

After running the installing the dependencies, you can run the application via node . or npm start.

I recommend using npm start in case of dev., because it may have extra scripts for correct execution of the same (you can analyze this by looking at package.json, in the scripts -> start session.

 0
Author: Fernando Franco, 2018-06-05 21:55:19