This is the simplest possible nodejs api using express.

Overview

NodeJS JWT Authentication sample

A Todo Application with NodeJS and ExpressJS that uses JWT authentication to manage each user's todos.

Available APIs

User APIs

GET /todos

You can do a GET to /todos to get all todos for user.

The JWT must be sent on the Authorization header as follows: Authorization: Bearer {jwt}

It returns the following:

[
  {todo},
  {todo}
]

POST /todos

You can do a POST to /todos to add todo.

The JWT must be sent on the Authorization header as follows: Authorization: Bearer {jwt}

The body must have:

  • title: The title

It returns the following:

[
  {new todo}
]

PUT /todos

You can do a PUT to /todos to update todo.

The JWT must be sent on the Authorization header as follows: Authorization: Bearer {jwt}

It returns the following:

The body must have:

  • id: The id
  • completed: true or false
[
  {todo}
]

DELETE /todos

You can do a PUT to /todos to remove todo.

The JWT must be sent on the Authorization header as follows: Authorization: Bearer {jwt}

It returns the following:

The body must have:

  • id: The id
{id}

Running it

Just clone the repository, run npm install and then node server.js. That's it :).

Issue Reporting

If you have found a bug or if you have a feature request, please contact me.

Author

MAOUCHE Yacine

License

This project is licensed under the MIT license. See the LICENSE file for more info.

You might also like...

The simplest yet effective jQuery idle plugin

jquery.inactivity The simplest yet effective jQuery idle (inactivity) plugin Download Uncompressed Compressed Purpose Listen for mouse, keyboard, touc

Oct 18, 2022

The simplest implementation of Golang channels, selects and wait groups

The simplest implementation of Golang channels, selects and wait groups

TypeScript Channels The simplest implementation of Golang channels, selects and wait groups Installation You can use one of the following package mana

Dec 8, 2022

This repo has demos, content and documentation of javascript concepts and syntax, in their simplest form. Contribute by sharing your understanding of javascript! Hacktoberfest Accepted!

javascript-documentation open-source hacktoberfest2022 Submit your PR to this javascript-documentation repo 🧭 🌟 ❗ This repo has some of my javascrip

Nov 2, 2022

Simplest ever I18N 1 KB library for HTML/JavaScript apps.

Simplest ever I18N 1 KB library for HTML/JavaScript apps.

Ultimate I18n JS 🤯 Ultimate internationalization library for web applications. Super simple & easy. Less than 1KB (minified and gziped). 0 dependenci

Dec 22, 2022

Simple NodeJS API without express, for learning purposes

Vanilla NodeJS API Simple NodeJS API without express, for learning purposes. I have been building RESTful APIs in NodeJS with the help of Express and

Nov 2, 2022

A CRUD implementation using sequelize, mySQL, NODEJS, Express, JWT and other technologies.

A CRUD implementation using sequelize, mySQL, NODEJS, Express, JWT and other technologies.

A ideia do projeto é simular o funcionamento do backend de um blog através da implementação de uma aplicação em Node.js usando o pacote sequelize para

May 11, 2022

A base API template for a REST API using express.

A base API template for a REST API using express.

express-api-template A base API template for a REST API using express. Philosophy Setting up a new project can be a long and tedious process, especial

May 29, 2022

An express-ve way to start an express project

Express-ve express starter An express-ve way to start an express project. Checkout a demo project here or Learn how to use express-ve here Are you sta

Mar 28, 2022

Repositório criado para prática do dia 14/05 utilizando nodeJs, express, nodemon e MVC. Como base utilizamos o modelo ER criado para uma locadora de filmes fictícia.

gamabuster Repositório criado para prática do dia 14/05 utilizando nodeJs, express, nodemon e MVC. Como base utilizamos o modelo ER criado para uma lo

May 18, 2022
Owner
Yacine Maouche
I'm a passionate web developer and designer. I also love freelancing and contributing to open-source.
Yacine Maouche
A rest api which scrapes data from asianembed or asianload. Made using NodeJS, Express and Cheerio.

A rest api which scrapes data from asianembed or asianload. Made using NodeJS, Express and Cheerio.

null 6 Dec 6, 2022
Awesome critique of crypto / web3. Curated list of high quality critique plus background. Seek to be as constructive as possible.

Awesome critique of crypto/web3 Awesome critique of crypto/web3, etc. Contributions are welcome. Critique General Stephen Diehl series - https://www.s

Rufus Pollock 1.5k Jan 1, 2023
🤪 A linter, prettier, and test suite that does everything as-simple-as-possible.

Features Fully Featured Code Grading Knowing if you need to work on your code is important- that's why we grade your code automatically. But, unlike o

Fairfield Programming Association 18 Sep 25, 2022
A comprehensive collection of useful tools developed with the help of Ethers.js to interact with the Ethereum Blockchain to develop great DeFi apps as quickly and easily as possible.

hudi-packages-ethersfactory How to install Installing with npm For more information on using npm check out the docs here. npm i @humandataincome/ether

HUDI 6 Mar 30, 2022
This is a library that makes it possible to change the configuration values of the Remix compiler (esbuild).

?? remix-esbuild-override ⚠️ While I believe you will most likely get a lot of benefit from using this library, it can sometimes destroy your product.

AijiUejima 73 Dec 22, 2022
🖼️ Image proxy for Next.js. Makes it possible to use dynamic domains in next/image component.

Next.js Image Proxy Image proxy for Next.js. Makes it possible to use dynamic domains in next/image component. ❔ Motivation This library makes it poss

Blazity 30 Dec 1, 2022
It is a simple Math Sprint Game in which the user must agree or disagree with the answers to math problems in the quickest time possible.

MATH-SPRINT-GAME The user must agree or disagree with the results of math equations in this Math Sprint Game. The amount of time the player spends mak

AMEY THAKUR 8 Aug 1, 2022
The simplest way to use AWS/GCP/Azure. From code to cloud in a few minutes.

Utopiops Utopiops is the best way for teams of any size to use cloud (AWS/Azure/GCP), with or without prior experience. We provide a platform that hel

utopiops 98 Dec 25, 2022
Tiny and fast utility to extract all possible values for a given enum.

Tiny (208B) and fast utility to extract all possible values for a given enum.

Andrea Cappuccio 2 Apr 18, 2022
Zero Two Bot,A fully Modular Whatsapp Bot to do everything possible in WhatsApp by Team Zero Two

?? ???????? ?????? ???? ?? A Moduler WhatsApp Bot designed for both PM and Groups - To take your boring WhatsApp usage into a whole different level. T

Sam Pandey 69 Dec 25, 2022