A progressive Node.js framework for building efficient and scalable server-side applications.
Nest server to consume Swapi API and Internal DB.
- Write an HTTP GET method to retrieve all information from the planets and people databases from SWAPI with a limit param. For example, if parameter A is 5, you will get only 5 elements of the total. Consider not using the internal database, but get the data directly from SWAPI.
- Write an HTTP GET method to retrieve information from the planets databases from SWAPI and save information in a internal database.
- Write an HTTP GET method to retrieve information from people databases from SWAPI and save information in a internal database.
- Write an HTTP POST method to save any information about people in your database.
Below are the endpoints that you will implement:
INFO | METHOD | URL |
---|---|---|
GET PLANETS WITH LIMIT | GET | :baseURL/api/planets?limit=:limit |
GET PEOPLE WITH LIMIT | GET | :baseURL/api/people?limit=:limit |
GET ANY PLANET BY ID | GET | :baseURL/api/planets/:planetId |
GET ANY PERSON BY ID | GET | :baseURL/api/people/:personId |
POST ANY PERSON | POST | :baseURL/api/people |
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
Run npm run start
for a dev server. Navigate to http://localhost:3000/
. The application will show Swagger API docs.
- Author - Axel LeguĂa Chero
- Linkedin - https://www.linkedin.com/in/axel-leguia-chero/