BOOTCAMP project: REST API

One of the projects of the 2022 Full-Stack Web Development Bootcamp (signups open March 29, bootcamp starts on April 05) is a REST API.

I want to give you a little preview of all the projects of the bootcamp in the coming weeks, let’s s…


This content originally appeared on flaviocopes.com and was authored by flaviocopes.com

One of the projects of the 2022 Full-Stack Web Development Bootcamp (signups open March 29, bootcamp starts on April 05) is a REST API.

I want to give you a little preview of all the projects of the bootcamp in the coming weeks, let’s start with the first one.

This is a REST API made with Next.js and Prisma, interacting with a PostgreSQL database.

In particular, we’ll build an API to track travel expenses.

The project is just about the API.

There will be no “client” that uses the API, but we’ll focus 100% on just creating an API in the best possible way. Imagine you’re part of a team that is building a big travel expenses platform app and you’re tasked with implementing the API.

All the projects in the Bootcamp will create and use a serverless REST API with the Next.js built-in API routes, and the React application will be the API client.

But here, we’ll focus on building the API and we’ll only talk to it through Insomnia, a very cool tool we use to interface with a REST API.

We’ll gather a list of requirements, and we’ll start designing the API by identifying the endpoints and HTTP methods we’ll support.

We’ll have to make some decisions, as the API designers.

Then we’ll start defining the parameters each API endpoint will require (mandatory parameters) and support (optional parameters).

It’s important to note that all this work is done before writing a single line of code.

We must first design the API on paper, and then we can start working on it.

We’ll start with a blank Next.js site and we’ll use it to host the API documentation.

Once we’ve done this work, it’s time to implement the API.

We’ll use Prisma, a wonderful ORM for SQL databases.

We’ll define the Prisma schema and we’ll create the migration needed to automatically create the database table from the schema.

Then we’ll create the first GET request, the simplest API endpoint.

Gradually we’ll implement all the other endpoints, including the ones that support the methods POST/PUT/DELETE.

This project will be essential to know how to build an API, how to build it in Next.js, and what are the things we need to think when tasked with such a project.

As we’ll be using an API for every bootcamp project, this will be a project you’ll always use as reference material to remember what you should do while implementing a REST API.


This content originally appeared on flaviocopes.com and was authored by flaviocopes.com


Print Share Comment Cite Upload Translate Updates
APA

flaviocopes.com | Sciencx (2022-02-14T05:00:00+00:00) BOOTCAMP project: REST API. Retrieved from https://www.scien.cx/2022/02/14/bootcamp-project-rest-api/

MLA
" » BOOTCAMP project: REST API." flaviocopes.com | Sciencx - Monday February 14, 2022, https://www.scien.cx/2022/02/14/bootcamp-project-rest-api/
HARVARD
flaviocopes.com | Sciencx Monday February 14, 2022 » BOOTCAMP project: REST API., viewed ,<https://www.scien.cx/2022/02/14/bootcamp-project-rest-api/>
VANCOUVER
flaviocopes.com | Sciencx - » BOOTCAMP project: REST API. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/02/14/bootcamp-project-rest-api/
CHICAGO
" » BOOTCAMP project: REST API." flaviocopes.com | Sciencx - Accessed . https://www.scien.cx/2022/02/14/bootcamp-project-rest-api/
IEEE
" » BOOTCAMP project: REST API." flaviocopes.com | Sciencx [Online]. Available: https://www.scien.cx/2022/02/14/bootcamp-project-rest-api/. [Accessed: ]
rf:citation
» BOOTCAMP project: REST API | flaviocopes.com | Sciencx | https://www.scien.cx/2022/02/14/bootcamp-project-rest-api/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.