Backend RESTful API for Live Art, serving up endpoints relating to storing artist data, logging in, and fetching artist data. Endpoints available:
- GET /artist
- POST /artist
- POST /artist/:username
To run this API on your machine, you will need Node.js and MongoDB installed on your machine.
To install Mongo, go to https://docs.mongodb.com/manual/installation/
To install Node, go to: https://nodejs.org/en/download/
The version required is a minimum of v. 13.8.0
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Clone a copy of the repository on your machine using the below command:
git clone https://github.com/katieraby/live-art-backend.git
- Install the required dependencies:
npm install
- For testing, install the required dev dependencies:
npm i -D mocha chai supertest
To connect to your live mongo database, ensure you set up a config file with your credentials. An example set-up of the file is below (don't forget to gitignore!):
const mongoUsername = "yourmongousername";
const mongoPassword = "yourmongopassword";
module.exports = { mongoUsername, mongoPassword };
To run the tests written for the API during the TDD process (including tests for error handling), run the following command:
npm run test