-
Notifications
You must be signed in to change notification settings - Fork 18
Getting Started
These instructions are to help you get set up locally. We will need to change the instructions as we migrate away from using Compass(a css framework/compiler that uses Ruby) to using a compiler that will work with Node.js. Without running compass, the API will still work, however the homepage will just show our markup/markdown without any styling. So, unless you're working on a ticket that involves the front-end and styling, we can get away with ignoring compass for now. The server will just show a homepage without styling.
You must have Node.js installed on your machine and be able to use npm
. To install the Node dependencies, here are the instructions:
- Fork/Clone the repository.
- Run
cd numbers_api
to get into the home directory of the repository. - Run
npm install
to install the Node dependencies. - Run
touch secrets.js
and let this file be blank for now. This is needed because in /app.js on line 16, secrets is being imported but no file exists. This is to prevent errors when starting the server. Alternatively, you can comment out line 16.
- In the home directory of the repo, run
compass compile public/
to generate the CSS for the front end. - Do not commit the .scssc files to git.
If you have nodemon installed(highly preferred), run nodemon
. Otherwise, follow the instructions below.
To get get the API server started(with an un-styled homepage), here are the instructions:
- Run
npm start
to run the start script. This will start the Node/Express server in the background. In other words, your terminal window will close, but the server will still run in the background. - Visit http://localhost:8124/ . The site may run with warnings in the terminal in the background, and these may be ignored for now.
- To stop the server, run
npm stop
. This runs the stop script to stop the server running in the background.