Building a Basic Todo List REST API in Node.js with Express
ACT
62.8K views
Sum'Up
Demo
1
2
3
4
5
6
7
8
9
10
11
12
13
<html>
<head>
<title>Todos list</title>
</head>
<body>
<ul>
<% todos.forEach( (todo) => {%>
<li> <%= todo.title %> </li>
<% })%>
</ul>
</body>
</html>
1
const express = require('express');
1
const sqlite3 = require('sqlite3');
In this tutorial, you have see some of the main concepts of Node.js that are needed to create a basic todo list application.
First, we have seen that Node.js is a non-blocking server based on V8, the JavaScript engine of Chrome, and that it's using an Event Loop. We also have seen how to require a module and create a REST API, then, we concluded this introduction with a quick look at EJS template.
There are so much topics about Node (such as modules in depth, Middlewares, sockets, fswatcher, how works libuv, etc.). Feel free to contribute by creating a new content about them.
This content is also part of the TodoList Exercises series which goal is to make a quick introduction to a technology by creating a small TodoList tutorial.
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.