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.
- Clone the repo using
git clone https://github.com/deschant/EPICMailAPI
- Run
yarn install
ornpm 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
NODE_ENV
: Node environment variablePORT
: The server's listening portMORGAN
: Morgan request logs formatting options. See valid values here.ID_LENGTH
: Length of IDs on data objectsHASHING_SECRET
: String used to hash user passwordsADMIN_TOKEN
: Admin token for testing purposes
- Change the
NODE_ENV
variable value to "test" - Run
yarn test
ornpm test
if you use npm
All the API endpoints are documented and available here