Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

nodejs API

NodeJS API template scaffolding.

Requirements

Node Modules

npm install -g mongoose-data-seed nodemon

MongoDB Client

You have multiple options, but two I prefer are here:

Robo Desktop Client

Download the Robo 3T Client

Mongoclient Docker Container

Use the NOSQL Client.

docker run -d -p 8080:8080 \
-v  data:/data/db \
-e MONGO_URL=mongodb://mongodb/nodejsapi \
mongoclient/mongoclient

Then access the client as a web app http://localhost:3100

Getting Started

Install dependencies:

yarn

Set environment variables:

cp .env.example .env

Running Locally

yarn dev

Running in Production

yarn start

Lint

# lint code with ESLint
yarn lint

# try to fix ESLint errors
yarn lint:fix

# lint and watch for changes
yarn lint:watch

Test

# run all tests with Mocha
yarn test

# run unit tests
yarn test:unit

# run integration tests
yarn test:integration

# run all tests and watch for changes
yarn test:watch

# open nyc test coverage reports
yarn coverage

Validate

# run lint and tests
yarn validate

Logs

# show logs in production
pm2 logs

Documentation

# generate and open api documentation
yarn docs

Docker

# run container locally
yarn docker:dev
or
docker-compose up -d

Inspirations

About

NodeJS API Scaffolding

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.