Skip to content

fadhlimustaffa/typescript-express-quickstart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quick Start a Typescript Express Node Server

Introduction

This repository can be used as a quickstart for a Node.js server using Express and TypeScript. Linting, config and an API call are included. However, a database connection implementation is not included.

Getting Started

Install

  • npm install

Compile Typescript

  • npm run compile

Lint

  • npm run lint

Run Server

  • npm start

Sample APIs

  • GET http://localhost:3000/hello
  • GET http://localhost:3000/hello?name=<your_name>

Project Structure

Server

  • The main app, server and routes are in src\server.ts.
  • Route functions are defined in controllers.

Controllers

  • Controllers handle the API routes.
  • Controllers will then call services.

Services

  • Services contain the main logic.
  • Services will call providers if required to.

Providers

  • Service providers handle 3rd-party API calls.

Models

  • Any models/interfaces used in the app.

Useful Links

About

A quick start for a TypeScript Express Node server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published