Giter VIP home page Giter VIP logo

express-typescript-mongoose-starter's Introduction

Pull Requests are welcome ;)

Quickstart application with Express, Typescript, Mongoose

This project is a starter for express, typescript and mongoose application, designed for Restful API's, but you can easily extend to make other things.

I couldn't find any complete guide to archieve this, so i've looked many tutorials and posts about express with typescript and came up with seed application.

Prerequisites

  1. Latest version of Node to be installed(i recommend NVM, easier to install and possible to work with multiple node versions).
  2. Install MongoDB and make sure it is running on default port 27017 (if not then please configure constants.ts and change the connection for mongoDB).

Steps to run

    npm install          <= install all the npm Dependencies
    npm run dev          <= start the Nodemon and watch for changes.

Directory Structure

express-typescript-mongoose-starter
    ├── dist                  <= typescript will compile js to this folder
    ├── node_modules
    ├── src
    │    ├── .env             <= for production, for other envs, use: .env.${NODE_ENV}
    │    ├── api
    │    │    ├── example     <= Replace example for feature name
    │    │    │    ├── example.controller.ts
    │    │    │    ├── example.model.ts
    │    │    │    ├── example.router.ts
    │    ├── config
    │    │    ├── express.ts
    │    │    ├── routes.ts
    │    ├── server.ts
    │    ├── tsconfig.json
    ├── package.json
    ├── tsconfig.json
    ├── README.md

Todo

  • Add JWT based authentication with passport.js
  • Add socket.io and inject socket instace to routes and controller
  • Command line support to generate libraries, modules, routes and controllers

License

MIT

express-typescript-mongoose-starter's People

Contributors

matheusdavidson 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.