Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/teddarific/node-api-starter
Starter Kit for an API built with Node, Express, Mongoose. Supports ECMA6.
https://github.com/teddarific/node-api-starter
api babel ecmascript6 eslint express herokuapp mongoose nodejs starter-kit template
Last synced: 26 days ago
JSON representation
Starter Kit for an API built with Node, Express, Mongoose. Supports ECMA6.
- Host: GitHub
- URL: https://github.com/teddarific/node-api-starter
- Owner: Teddarific
- Created: 2017-11-29T19:56:57.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T09:56:42.000Z (about 2 years ago)
- Last Synced: 2024-11-02T07:42:20.370Z (2 months ago)
- Topics: api, babel, ecmascript6, eslint, express, herokuapp, mongoose, nodejs, starter-kit, template
- Language: JavaScript
- Size: 172 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node API Starter Kit
A starter kit for making an API built on Node, Express, and Mongoose. Supports ECMA 6, and configured to deploy on Heroku.
### Setup
Open terminal, and go to desired file location.
First, ensure you have Node installed.
Clone the repo to local machine:
```
git clone https://github.com/Teddarific/Node-API-Starter.git
```Switch into the repository:
```
cd Node-API-Starter
```Install the dependencies:
```
npm install
```### Running the Server Locally
To run the server locally:
```
npm start
```To enable hot reloading, ensure that you have ```Nodemon``` installed globally through
```
npm install -g nodemon
```Start the server locally with hot reloading:
```
nodemon --exec npm start
```### Connecting to a Database
This API utilizes a MongoDB through Mongoose. If not set up, the server will default to a local DB with the URI as ```mongodb://localhost/testdev```.
To connect to a separate hosted database, create a ```.env``` file within the directory and enter the following relevant information:
```
DB_USERNAME=JohnDoe
DB_PASSWORD=abcde12345
DB_PORT=9000
DB_DATABASE=Prod
```The server will then attempt to connect with the following URI:
```
mongodb://DB_USERNAME:DB_PASSWORD@host:DB_PORT/DB_DATABSE
```