https://github.com/suyashkumar/node-start
https://github.com/suyashkumar/node-start
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/suyashkumar/node-start
- Owner: suyashkumar
- Created: 2016-04-24T02:07:34.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-20T06:27:09.000Z (almost 10 years ago)
- Last Synced: 2025-02-10T05:13:10.523Z (over 1 year ago)
- Language: Shell
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# node-start
A quick shell script I wrote to init very simple NodeJS/Express server projects as I like them. Simply clone to the directory of your choosing and run `./node-start`. You must have installed mongodb (and have it running) to run this server. To start up the server, simply:
1. Set the port to listen on by setting the `PORT` environment variable:
```sh
export PORT=9001
```
2. Run the server: `node server.js`
3. Test that the routes are in working order:
```sh
curl localhost:$PORT/hello
```
The above should return 'hello'
Routes are located in `/config/rotues.js` and the MongoDB setup is in `/config/db.js`