The project is generated by LoopBack.
- First install Loopback. Then you will scaffold out a new server-side application using Loopback. Set up a model and explore the REST API automatically scaffolded out by Loopback.
- Use Loopback to quickly scaffold out a server-side application
- Use Loopback to define a model and automatically let it construct the corresponding REST API
At the command prompt, type the following to install Loopback command-line tools globally:
npm install strongloop -g
Make sure to use sudo if you are installing on OS X or Linux machines. Scaffolding Out a Loopback Application At a convenient location on your computer, type the following at the prompt to scaffold out a Loopback application:
slc loopback
To create a Loopback model for dishes, type the following at the prompt:
slc loopback:model
- For the model name type dishes. For the data source select db. For the model's base class select PersistedModel.
- Say Yes to REST API, and select the common model.
- Loopback will prompt for the properties of the model. Create the following properties, all of String type: name, description, category, image, label and price. All are required except label. For label, select the default value as ' ', and for price the default value as 0.
- Start the server by typing at the prompt:
node .
- Explore the REST API supported by the server.