Skip to content

Files

Latest commit

 

History

History
77 lines (50 loc) · 2.18 KB

README.md

File metadata and controls

77 lines (50 loc) · 2.18 KB

Back-end Challenge 2021 🏅 - Space Flight News

This is a challenge by Coodesh

Description

Backend service for the Coodesh "Back-end Challenge 2021 🏅 - Space Flight News".
The service consumes the Space Flight News API, saving articles about space news on its own database and exposing them through its own API.

Loom presentation link: https://www.loom.com/share/8030dc795bd94a3b9965c509cf8221ee

Try it Live!

Base URL: https://space-flight-news-backend-node.herokuapp.com/
Documentation URL: https://space-flight-news-backend-node.herokuapp.com/api

It might take a while for the service to answer on the first time.

Technologies Used

Installation

$ npm install

Running the service

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# test coverage
$ npm run test:cov

General Instructions

In order to successfully start the service, you also need to set the following environment variables:

  • MONGODB_CONNECTION_STRING -> The connection string (URI) to the Mongo Database

The default port where the server listens to the requests is 3000, but it can be changed by setting a different value to the optional PORT environment variable.

Documentation

To see how to interact with the endpoints, please reffer to the Swagger documentation that can be found at /api.

Docker Instructions

When executing the image, you need to pass the following environment variables:

  • MONGODB_CONNECTION_STRING -> The connection string (URI) to the Mongo Database

The container will start with the service running and listening to the port 3000, if successfully started.