Starter Node APi
StarterNodeApi
The easiest way to get started is to clone the repository:
# Get the latest snapshot with https
git clone https://github.com/jtdarkly/StarterNodeApi.git
# or ssh
git clone git@github.com:jtdarkly/StarterNodeApi.git
# Change directory
cd StarterNodeApi
# Install NPM dependencies
npm install
You will need to create an .env file in the project directory.
NODE_ENV=yourvalue
HOST=yourvalue
PORT=yourvalue
PUBLIC_BASE_URL=yourvalue
DB_HOST=yourvalue
DB_PORT=yourvalue
Within app, defaults are set to:
NODE_ENV=development
HOST=http://localhost
PORT=1337
PUBLIC_BASE_URL=http://localhost:1337
DB_HOST=127.0.0.1
DB_PORT=6379
# Start the API server using node
npm start
# Start in development mode
npm run dev
# Test it*
npm test
# or
npm run test:all
# Just integration test*
npm run test:integration
# Just unit test*
npm run test:unit
# Just system test*
npm run test:system