The project is generated by LoopBack using MongoDB hosted on MLabs.
to start the server you should have Node.js and run the NPM instaled. Clone the repo and then run
npm install
Allow the packages to fully install and then you should be able to run
node .
from the command line
This should start your server on localhost:3000. You will see something that looked like it's broken. That's a good sign!
Travel to http://localhost:3000/explorer and you'll see our available models. Click movies
to see all the available routes for that model. Click Users
for the same.
You can click on one of the protocols and test the API directly from the explorer. Or travel to http://localhost:3000/api/movies
to see all the movies listed. The current schema is:
{
"title": "Superbad",
"run_time": "90min",
"genre": "comedy",
"description": "Hinjinks ensue -- we can deletethis at any time",
"id": "59e44e0e30fd4a2db463605f"
}
We can edit this schema at any point in time. We might not need it at all.
Okay, so we are running React in development so all client facing files should be in the client_src
directory so we can keep our servers separate and then production ready application can run on the same port at the server.
For now the React app should run on port 3001
which is in the config file.
You may need to run npm install
again, I'm not totally sure, but once it's ready you can either run
npm start
or yarn start
to get the basic react package started!