Giter Site home page Giter Site logo

rest-api-tutorial's Introduction

Build a REST API with Node.js, Mongoose & TypeScript

Note: This repository and video has been recreated

Article: https://tomanagle.medium.com/build-a-rest-api-with-node-js-typescript-mongodb-b6c898d70d61 Video: https://youtu.be/goUbHgAzPCs

Note: This repository includes the postman collection for the finished API

Who is this tutorial for?

  • Junior to mid-level developers
  • Anyone interested in building REST APIs with TypeScript

Why?

  • REST APIs are the staple of the web development industry
  • Knowing how REST APIs is important for both back and frontend developers
  • There's no better way to understand how they work than to build one

Concepts

  • REST API principals

    • CRUD
    • HTTP methods
    • What REST is and is not
  • JWT & refresh tokens

Technologies

  • Node.js
  • MongoDB with Mongoose
  • TypeScript
  • Express.js & Express.js middleware

Video structure

  1. What are we going to build
  2. Bootstrap application
  3. Build out registration
  4. Build out post CRUD operations

Let's keep in touch

Buy me a Coffee

Sign up to DigitalOcean ๐Ÿ’–

rest-api-tutorial's People

Contributors

himanshuhsn avatar tomanagle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rest-api-tutorial's Issues

Object is of type 'unknown'. error

{
"version": "1.0.0",
"main": "index.js",
"scripts": {
"dev": "nodemon --config nodemon.json source/app.ts"
},
"license": "MIT",
"dependencies": {
"bcrypt": "^5.0.1",
"config": "^3.3.6",
"cors": "^2.8.5",
"dayjs": "^1.10.6",
"express": "^4.17.1",
"jsonwebtoken": "^8.5.1",
"lodash": "^4.17.21",
"mongoose": "^6.0.2",
"nanoid": "^3.1.25",
"pino": "^6.13.1",
"pino-pretty": "^6.0.0",
"yup": "^0.32.9"
},
"devDependencies": {
"@types/bcrypt": "^5.0.0",
"@types/body-parser": "^1.19.1",
"@types/config": "^0.0.39",
"@types/cors": "^2.8.12",
"@types/express": "^4.17.13",
"@types/jsonwebtoken": "^8.5.5",
"@types/lodash": "^4.14.172",
"@types/mongoose": "^5.11.97",
"@types/nanoid": "^3.0.0",
"@types/node": "^16.7.5",
"@types/pino": "^6.3.11",
"@types/yup": "^0.29.13",
"ts-node": "^10.2.1",
"typescript": "^4.4.2"
}
}

With this package's code not run. get error
source/controller/user.controller.ts:12:33 - error TS2571: Object is of type 'unknown'.

Please give feedback how to solve.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.