This is a demo API, created for educational purposes. The main use of this code is to orient Ironhack's students with their second project on the Web Development Course.
This project consists on a base code for constructing a REST API that provides minimal data about known galaxies in the universe.
- Show a demo API using a simple server setup with Express.js
- Document its routes and params in Swagger
- Create a basic project structure for designing APIs with Javascript
- You should have MongoDB Community Edition ^4.2 running on your machine
- Download or clone this repo
- Run
npm install
to download project dependencies - Run
npm start
- Project will run on
http://localhost:3000
by default - To populate database, run
npm run seed
.
You must create a .env
file in the root folder and setup the following variables
PORT
= number_of_port [default=3000]ENV
= [development || production]DATABASE_URL
= mongodb_database_url
- This project:
- is adept to the Karma conventions for commit messages
- uses express-swagger-generator to document API endpoints