A repository containing the backend API for Warbler
The API can be accessed from this URL
Clone this repository
git clone https://github.com/bmuthoga/warbler-server.git
Navigate into its root directory
cd ./warbler-server
Install dependencies
yarn
Create a .env
file and set the following required environment variables in it:
VARIABLE | VALUE | DESCRIPTION |
---|---|---|
SECRET_KEY | The secret key to be used to sign and verify JWT tokens | |
NODE_ENV | development | To set mongoose debug to true for development environments |
yarn test
NPM - Dependency Management
NodeJS - Javascript Run-Time Environment
ExpressJS - Web Application Framework for NodeJS
Mongoose - Mongodb Object Modeling for NodeJS
To start the server
node index.js
API Endpoints
POST /api/auth/signin
Log in a user
POST /api/auth/signup
Register a new user
POST /api/users/<user_id>/messages
Create a new message
GET /api/messages
List all messages
GET /api/users/<user_id>/messages/<message_id>
Fetch a specific message
DELETE /api/users/<user_id>/messages/<message_id>
Delete a specific message
This project is licensed under the ISC License