Skip to content

Latest commit

 

History

History
44 lines (39 loc) · 856 Bytes

local-install.md

File metadata and controls

44 lines (39 loc) · 856 Bytes
layout title
default
Local Installation

Requirements

  • MongoDB
  • Node >7.4
  • pm2 (production)

Setting up & running locally

1. Clone the repo.

git clone [email protected]:restfulnews/api.git
cd api

2. Install dependencies.

npm i

3. Initalise the environment.

cp .env.example .env

Replace the provided example keys with your own keys in .env.

4. Start the server.

npm start

Note: Make sure mongodb is running.

Commands

npm test # test using Jest
npm run test:unit # run unit tests
npm run test:integration # run integration tests
npm run coverage # test and open the coverage report in the browser
npm run lint # lint using ESLint
npm run dev () # run the API in development mode
npm run prod # run the API in production mode
npm run docs # generate API docs