Code Monkey home page Code Monkey logo

express-routing-template's Introduction

Express js route handler

A simple yet convenient expressjs route handler made so it will be easy for you to start your next express backend as soon as possible.

Features

  1. MongoDB database support included with mongoose and a connector function to connect to your database. A seperate folder for writing schemas also is included.
  2. Easy version handling by adding api version folder for each version.
  3. folders for each type of route (create, read, update, delete) you can add more like auth for example.
  4. Works with vercel
  5. Built in errorHandler and folder for writing your middleware
  6. Enables trust proxy if running in production environment so express will return the correct ip instead of the server proxy IP.
  7. Beautiful request logging powered by morgan

Usage

  1. Clone this repository
  2. create .env file and add a variable called MONGODB_URI which should be equal to your mongoDB database URL
  3. run node index.js and the server should start.

note: when running in production make sure to add a environment variable caled NODE_ENV which should be equal to production for better optimization

Contribution

Got any improvements? submit a pull request.

express-routing-template's People

Contributors

spicybirsge avatar

Stargazers

Travinth Dayalaeaswaran avatar  avatar

Watchers

 avatar

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.