• Stars
    star
    336
  • Rank 121,455 (Top 3 %)
  • Language
    JavaScript
  • Created almost 7 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

How to secure a Nodejs RESTful CRUD API using JSON web tokens?

Securing RESTful APIs with JWT

How to secure a Nodejs RESTful CRUD API using JSON web tokens?

This tutorial will demo how to use JWT with an existing bare bones API using mongodb as the database.

It consist of a User model and controller. The model defines the data, and the controller will contain all the business logic needed to interact with the database.

It has a db file which will be used to connect the app to the database, and an app file used for bootstrapping the application itself.

The server file is used to spin up the server and tells the app to listen on a specific port.

The auth folder contains the configuration for registering and logging users in, signing and verifying tokens.

Follow the tutorial for this repository at https://medium.freecodecamp.org/securing-node-js-restful-apis-with-json-web-tokens-9f811a92bb52

More Repositories

1

nodejs-restful-api

How to create a RESTful CRUD API using Nodejs?
JavaScript
327
star
2

a-crash-course-on-serverless-auth

A short and easy boilerplate showcasing JWT auth with Nodejs, the Serverless framework, MongoDB and AWS Lambda.
JavaScript
159
star
3

serverless-docker-image-resize

Simple serverless image resize on-the-fly - Deploy with one command - Built with AWS Lambda and S3
JavaScript
125
star
4

serverless-side-rendering-react-next

Sample repo for setting up Next and React on AWS Lambda with the Serverless Framework.
JavaScript
121
star
5

serverless-side-rendering-vue-nuxt

Sample project for using Nuxt.js to create a server-side rendered Vue.js app on AWS Lambda and AWS API Gateway.
JavaScript
118
star
6

lambda-mailer

Simple module for receiving an email from a contact form on your website.
JavaScript
83
star
7

building-a-serverless-api-with-nodejs-and-aws-aurora-serverless

JavaScript
62
star
8

building-a-serverless-rest-api-with-nodejs

A quick and easy guide of how to hook up a single Serverless service with basic MongoDB connection and CRUD interaction.
JavaScript
62
star
9

gulp-all-the-things

This tutorial will demo how to set up a bare bones Gulp configuration for automating the time consuming tasks you need to run on a regular basis.
JavaScript
32
star
10

lambda-sns-dlq-error-handling

Sample project for showing the ability to publish an SNS topic and trigger a function from the topic. Code is structured to create a timeout/crash so the dead letter queue SNS topic gets published, in turn triggering the error handler function.
JavaScript
31
star
11

a-crash-course-on-serverless-with-nodejs

A quick and easy guide of how to hook up a single Serverless service.
JavaScript
28
star
12

boilerplate-api

Lightweight Node.js boilerplate API with Docker support, test coverage and circle.ci support.
JavaScript
23
star
13

a-crash-course-on-serverless-apis-with-express-and-mongodb

JavaScript
20
star
14

express-sls-app

How to deploy a Node.js application to AWS Lambda using Serverless, a quick start.
JavaScript
19
star
15

express-docker-app

Hyperminimal setup of an Express app with Docker. :)
Dockerfile
15
star
16

building-a-serverless-rest-api-with-nodejs-and-mongodb-stitch

Sample repository for building a serverless service on AWS Lambda with MongoDB Stitch as a persistent data store
JavaScript
10
star
17

load-balancing-nodejs-in-production

Four samples of how to load-balance Node.js in production.
JavaScript
9
star
18

a-crash-course-on-testing-with-nodejs

JavaScript
9
star
19

meetup-lucky-winner-generator

A simple package with zero dependencies for generating lucky winners if there is a free coupon giveaway at a Meetup event!
JavaScript
6
star
20

hacktoberfest-sarajevo

Official resources for the Sarajevo Hacktoberfest Open Hack Day
5
star
21

nodejs-monitoring-sematext

Starter setup for monitoring Node.js apps with Sematext
JavaScript
5
star
22

express-sls-app-with-stitch

Sample repository for building a serverless service on AWS Lambda with MongoDB Stitch as a persistent data store
JavaScript
5
star
23

javascriptzapocetnike

Exersize Files
HTML
5
star
24

adnanrahic.com

HTML
4
star
25

sls-node11

JavaScript
3
star
26

Serverless-JavaScript-By-Example

JavaScript
3
star
27

a-gentle-intro-to-express

JavaScript
3
star
28

getting-started-with-aws-lambda-and-nodejs

JavaScript
2
star
29

a-crash-course-on-docker

HTML
2
star
30

nodejs-logging-made-easy

JavaScript
1
star
31

weather-app

JavaScript
1
star
32

cdn

1
star
33

a-crash-course-on-integration-testing-with-nodejs

JavaScript
1
star
34

bita4students-nodejs-api

JavaScript
1
star
35

FinalNotesApp

JavaScript
1
star
36

mean-stack-101

MEAN Stack Boilerplate - Intro to the MEAN stack with a notes app
JavaScript
1
star
37

kubernetes-sandbox

Shell
1
star
38

node-memory-leaks

JavaScript
1
star
39

tracetest-docs-update

JavaScript
1
star
40

vanilla-js-app

Creating an app using ES5
JavaScript
1
star
41

error-handling-made-easy

JavaScript
1
star
42

boilerplate-api-ts

This will soon be a lightweight Node.js boilerplate API with TypeScript, Docker support, test coverage and circle.ci support.
TypeScript
1
star