Coder Social home page Coder Social logo

dalenguyen / rest-api-node-typescript Goto Github PK

View Code? Open in Web Editor NEW
467.0 18.0 161.0 775 KB

Building RESTful Web APIs with Node.js, Express, MongoDB and TypeScript

Home Page: https://restful-api-node-typescript.books.dalenguyen.me

TypeScript 100.00%
nodejs express mongodb typescript hacktoberfest

rest-api-node-typescript's People

Contributors

cheban1996 avatar dependabot[bot] 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rest-api-node-typescript's Issues

Type 'typeof e' has no call signatures.ts(2349)

this is not your project error.When I learn express, I copy your code in my project , and then I get the erorr.and I can fix it by myself,but I can't understant why in your project is ok.Can you help me to telling why?
image

.

sorry, I was blind. wrong repo...

.

sorry, I was blind. wrong repo...

.

sorry, I was blind. wrong repo...

A doubt of structure

Sorry to open this issue but it is the only way that I found to communicate with you.
I have a question about how to chain the routes of another feature beautifully.

For example, I have seen that many programmers use this form a lot:
app.use ('/ api / genres', genres);
app.use ('/ api / customers', customers);
app.use ('/ api / movies', movies);
app.use ('/ api / rentals', rentals);
app.use ('/ api / users', users);
app.use ('/ api / auth', auth);
app.use ('/ api / returns', returns);

where the second value is an express router

How could I do this to make it look nice in crmRoutes.ts so that it looks beautiful and clean?

Multer setup

H, can you maybe help me in setting up multer? I'm not sure where to add the middleware to the route where I want to use it. If you need code let me know but I can't seem to get it to work.

.

sorry, I was blind. wrong repo... How to I delete this?

How to apply API prefix

Hello dalenguyen,

I want to apply '/api/v1' prefix to your API, but I do not know how to do it. Can you help me?

Thank

Cannot find moduel "app" error

Firstly thanks for your tutorial and also sorry if this is not the place to post this, as this is more a question rather than an issue.

So if you use the import statement in the server.ts file as follows:
import app from "./app";
It will pick the export reference from your app.ts file, everything works fine.

On the other hand if you use:
import app from "app";
VSCode will be able to pick the reference from the app.ts and is able to tell you that your import app is correctly imported and is able to trace back where does it come from, but the typescript compiler (probably correctly) fails as it's not able to find the module "app".

Why is this happening, what piece of knowledge am I missing?

Thanks and again sorry if this is not the place to post this.

Passport JS setup with typescript and routes middleware

Hi

I'm having issues with getting certain functions to work. I can register & login using passport just fine. The problem I'm having is if someone is making a request and I want to check "req.user" || "req.isAuthenticated()"

I'm also using passport-local-mongoose for only local authentication.

Any help will be gladly appreciated!

SO Question: https://stackoverflow.com/questions/51180231/issue-with-connect-mongo-passport-passport-local-mongoose-with-session-no-pre

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.