Self-paced

Explore our extensive collection of courses designed to help you master various subjects and skills. Whether you're a beginner or an advanced learner, there's something here for everyone.

Bootcamp

Learn live

Join us for our free workshops, webinars, and other events to learn more about our programs and get started on your journey to becoming a developer.

Upcoming live events

Learning library

For all the self-taught geeks out there, here is our content library with most of the learning materials we have produced throughout the years.

It makes sense to start learning by reading and watching videos about fundamentals and how things work.

Search from all Lessons


LoginGet Started

Register to 4Geeks

← Back to Projects

Create an API Rest in NodeJs with ExpressJS

Difficulty

  • easy

Average duration

2 hrs

Technologies

  • node

  • REST

  • apis

  • express

Difficulty

  • easy

Average duration

2 hrs

Technologies

  • node

  • REST

  • apis

  • express

πŸ”₯ This exercise is designed to be performed by 1 person.

Technologies: Node, express, express-generator.

We are going to create a REST API that in it we can manage an array of tasks from node/express.

The idea is to create with node and express the different endpoints or routes to perform a CRUD (Create, List, Update, Delete) on an array of tasks.

🌱 How to start this project

a) Configure express from scratch.

b) Create the project using express-generator.

πŸ’‘ Important: save your code to your new repository using add, commit and push.

Strategy

Take a few minutes to analyze 🀯 your strategy on it, identify the elements that you are going to use as express:

Once the strategy is finished you can start coding, start programming 🎊!

About the project we are going to build

In this project we must build a REST API that exposes the following 4 routes to the internet:

1GET /todos 2POST /todos 3PUT /todos/:position 4DELETE /todos/:position

GET /todos

It should return the existing tasks in the array.

1[ 2 { 3 "done": false, 4 "label": "Sample Todo 1" 5 }, 6 { 7 "done": false, 8 "label": "Sample Todo 2" 9 } 10]

POST /todos

We must be able to send the following data to the endpoint and be able to add said data to the tasks array.

1{ 2 "done": false, 3 "label": "Sample Todo 1" 4}

PUT /todos/:position

We must be able to send the following data to the endpoint and be able to update said data in the task array according to its position.

1{ 2 "done": true, 3 "label": "Sample Todo 1" 4}

And return the updated list of all.

DELETE /todos/:position

You should remove the task from our array according to the position given to the endpoint in the url and return the updated list of tasks.

Signup and get access to similar projects

We will use it to give you access to your account.
Already have an account? Login here.

Difficulty

  • easy

Average duration

2 hrs

Technologies

  • node

  • REST

  • apis

  • express

Difficulty

  • easy

Average duration

2 hrs

Technologies

  • node

  • REST

  • apis

  • express

Difficulty

  • easy

Average duration

2 hrs

Technologies

  • node

  • REST

  • apis

  • express

Difficulty

  • easy

Average duration

2 hrs

Technologies

  • node

  • REST

  • apis

  • express

Signup and get access to similar projects

We will use it to give you access to your account.
Already have an account? Login here.

Difficulty

  • easy

Average duration

2 hrs

Technologies

  • node

  • REST

  • apis

  • express

Difficulty

  • easy

Average duration

2 hrs

Technologies

  • node

  • REST

  • apis

  • express