Skip to content

RobYed/nodejs-typescript-starter

Repository files navigation

NodeJS TypeScript Starter

Build Status Dependencies Known Vulnerabilities

A thin starter template for NodeJS / Express projects written in TypeScript + ES6.

The goal of this project is to provide a basic template for new NodeJS projects based on Express and written in TypeScript + ES6. It features a simple example Express app, npm build scripts, Jasmine test examples, TypeScript linting and more.

Features

  • Example Express 4.x app
    • Basic RESTful CRUD application
    • MVC project structure
    • Application logging with winston
    • HTTP request loggin with morgan
    • Secure HTTP headers with Helmet
    • public folder for static files
  • TypeScript
  • ES6 modules
  • NPM as build tool
  • Nodemon for live-reload during development
  • Debugging integration for Visual Studio Code
  • Unit-Testing with Jasmine
  • TSLint linting
  • Code coverage with Istanbul
  • Security vulnerability monitoring with Snyk
  • Prepared for Travis CI

I intentionally did not include any database as the choice of the right database highly depends on your use case.

Usage

  1. Clone this Repository and change into its directory

    git clone --depth=1 https://github.com/RobYed/nodejs-typescript-starter.git your-project-name

    cd your-project-name

  2. Install NodeJS > v5.0.0. It is suggested to use Node Version Manager to install NodeJS: NVM at Github

  3. Install global dependencies:

    npm install -g typescript

  4. Install project dependencies (npm install), build and start dev server:

    npm start

Folder Structure

coming soon

Build Tasks

coming soon

Visual Studio Code

It is recommended to use a code editor or IDE with great NodeJS and TypeScript support. Visual Studio Code has one of the best integrations for both technologies and is open-source. Recommended Extensions for Visual Studio Code in combination with this starter template are:

License, Copyright etc.

Copyright 2017 Robert Dey Licensed under the terms of the MIT License. Please share with your neighbor.

About

A thin starter template for NodeJS / Express projects written in TypeScript + ES6

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published