loading...

NodeJS Rest Express MongoDB and more: typescript, passport, JWT, socket.io, HTTP2, async/await, nodemailer, templates.

ngduc profile image Duc Ng ・1 min read

Hey there!

Have you tried to set up a backend NodeJS app with typescript, passport, JWT, socket.io, HTTPS, HTTP2, async/await, nodemailer, templates, pagination, docker, yada yada !@#$%&*() ?

Hope I didn't scare you away with those jargons :)
If you're still there, welcome onboard!

I have spent quite some time surfing around looking for the right NodeJS backend setup for my webapps but I haven't quite found the one that fits all of my needs. So here we go, same old same old introduction:

NodeJS Rest Express MongoDB (REM) - a production-ready lightweight backend setup.

Ready? Go...

 Typescript      Express 4.15       CORS     Helmet    DotEnv   joi (validation)   forever
  Mongoose 4.9    Passport  JWT      Await
  Tslint          Apidoc    Docker   Husky    Morgan    Travis   Windows (Powershell)
  Tests
            Mocha  Chai     Sinon    istanbul
  MORE:
            HTTPS           HTTP2 (spdy)      Socketio 2.1       Init DB Data
            Slack message   Nodemailer        Mailgun            Email Templates    Forgot Password
            VSCode Debug    Dependabot        Codacy             File upload (multer)
      API
            API response    (data, meta: limit, offset, sort)    Transform res
            apiJson         Pagination query      Regex query    Whitelist fields in response
            mstime          API response time     Stack trace in Response

Hope that one didn't hurt your eyes also :] (hey, you're still here with me right?)

Ok, I admit that I'm not good at writing these stuff.
How about a link if you're still interested in all of those jargons and want to set up a robust backend app?

ngduc / node-rem

Node REM - NodeJS Rest Express MongoDB and more: typescript, passport, JWT, socket.io, HTTPS, HTTP2, async/await, nodemailer, templates, pagination, docker, etc.

Node REM

NodeJS Rest Express MongoDB (REM) - a production-ready lightweight backend setup.

Build Status Codacy Badge

🌟 It rains cats and dogs features:

  Typescript      Express 4.15       CORS     Helmet    DotEnv   joi (validation)   forever
  Mongoose 4.9    Passport  JWT      Await
  Tslint          Apidoc    Docker   Husky    Morgan    Travis   Windows (Powershell)
  Tests
            Mocha  Chai     Sinon    istanbul
  MORE
            HTTPS           HTTP2 (spdy)      Socketio 2.1       Init DB Data
            Slack message   Nodemailer        Mailgun            Email Templates    Forgot Password
            VSCode Debug    Dependabot        Codacy             File upload (multer)
      API
            API response    (data, meta: limit, offset, sort)    Transform res
            apiJson         Pagination query      Regex query    Whitelist fields in response
            mstime          API response time     Stack trace in Response

📦 Installation

Clone this project:

git clone https://github.com/ngduc/node-rem.git your-app
cd your-app
rm -rf .git
yarn
  • Update package.json and .env file with your information.
  • Run yarn dev, it will create a new Mongo DB "node-rem"
  • Verify: use…

Hope you find it useful. Drop me a line below if you have questions/feedbacks.
Thanks!

Posted on Mar 14 '19 by:

ngduc profile

Duc Ng

@ngduc

JS enthusiast / 15y tinkering with screens & code.

Discussion

markdown guide
 

Hi Duc,

Thanks for the contribution of this boilerplate repo.

Do you still use or recommend this repo in 2020?. I quickly tried the repo and i can see some BlueBird and other libraries which may be outdated in 2020. Whats your take?

Moreover, the typescript says require not found. Is this because of old typescript 3.3 is not compatible with NodeJS 10?

Regards
Nirmal