Giter Site home page Giter Site logo

simple-node-express-typescript-template's Introduction

Simple Nodejs + ExpressJS + TypeScript Template

Pre-requisites

Getting started

  • Clone the project
$ git clone https://github.com/damorz/simple-node-express-typescript-template.git
  • Install dependencies
$ cd simple-node-express-typescript-template
$ yarn
  • Run project in devloper environment
$ yarn dev
  • Or build and run the project
$ yarn build
$ yarn start

Server will run on http://localhost:5000

Project Structure

The folder structure of this app is explained below:

├── dist                                  - Contains the distributable (or output) from your TypeScript build.
├── src
|   ├── @types                            - Store type of variable or function in project.
|   |   ├── common.type.ts                - Common type that use in all module.
|   |   └── etc                           - More types.
|   ├── controllers                       - * APIs Controller.
|   ├── routes                            - All of API routes.
|   |   ├── index.ts                      - Main station that store main route of services.
|   |   └── etc                           - Other routes.
|   ├── services                          - * Core of Business logic here.
|   └── index.ts                          - Our app start here.
├── .env                                  - * Environment that application will read.
├── .eslintrc.json                        - Configuration of Eslint.
├── package.json                          - Contains npm dependencies and script.
└── tsconfig.json.js                      - Configuration of TypeScript.

Build Script

Script Description
tsc Simple build TypeScript files.
start Runs full build and runs node on dist/index.js. Can be invoked with yarn start.
build Remove ./dist and full build. Runs all build tasks.
dev Runs full build and watch change ro recompile. Can be invoked with yarn dev.
lint Runs eslint on project files.

simple-node-express-typescript-template's People

Contributors

damorz avatar

Stargazers

Ananya P. 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.