deschantkn / EPICMailAPI

NodeJS/Express REST API powering EPICMail-React

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EPICMailAPI

The Backbone of plain and simple communication. This is the Nodejs REST API which will be supporting the mail application here. The project has user authentication and authorization, as well as sending and receiving messages ready to go.

Build Status Coverage Status Maintainability

Installation steps

  • Clone the repo using git clone https://github.com/deschant/EPICMailAPI
  • Run yarn install or npm install if you use npm
  • Create a .env file at the root of the project and fill out the variables you can find in .env.example file
  • You need to at least set the NODE_ENV variable's value before running the command in the next step
  • You can now run yarn start or the npm equivalent

Environment Variables

  • NODE_ENV: Node environment variable
  • PORT: The server's listening port
  • MORGAN: Morgan request logs formatting options. See valid values here.
  • ID_LENGTH: Length of IDs on data objects
  • HASHING_SECRET: String used to hash user passwords
  • ADMIN_TOKEN: Admin token for testing purposes

Steps for running tests

  • Change the NODE_ENV variable value to "test"
  • Run yarn test or npm test if you use npm

Documentation

All the API endpoints are documented and available here

About

NodeJS/Express REST API powering EPICMail-React


Languages

Language:JavaScript 46.8%Language:HTML 44.8%Language:CSS 8.4%