/ts-nodejs-express-starter

Nodejs Express server starter using Typescript

Primary LanguageTypeScriptMIT LicenseMIT

Typescript starter for nodejs with express

Prerequisites

Usage

Clone this repository and change the following in package.json file to suite your project:

  "name": "ts-express-starter",
  "version": "0.0.1",
  "description": "nodejs express server configured with typescript",

Project file structure

- src/
-   app.ts  # main file
- tsconfig.json
- package.json
- node_modules/
- dist/ # all of our built ts files get put here by the compiler

Write the sourcecode using typescript under the src directory.

Install Dependencies

npm install

Running the Development Server

npm run watch

The server will be listening on port 3000. Any changes to the code-base will be picked up and the server will be restarted.

Open browser at http://localhost:3000/hello