Skip to content

This is a minimal starter project to build an API using Express.js with TypeScript. It includes a basic project structure, essential TypeScript configuration, and basic scripts for development.

Notifications You must be signed in to change notification settings

murtazabaanihali/express-ts-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Express.js + TypeScript Starter

This is a minimal starter project to build an API using Express.js with TypeScript. It includes a basic project structure, essential TypeScript configuration, and basic scripts for development.

Features

  • Express.js: Fast, unopinionated web framework for Node.js
  • TypeScript: Typed JavaScript at scale
  • Nodemon: Automatically restarts the server on file changes
  • ESLint: Linter for finding and fixing code issues

Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/murtazabaanihali/express-ts-starter.git
    cd express-ts-starter
  2. Install dependencies:

    npm install
    # or
    yarn install

Project Structure

.
├── src                 # Source code
│   └── app.ts          # Entry point of the application
├── dist                # Compiled JavaScript output
├── .eslintrc.json      # ESLint configuration
├── tsconfig.json       # TypeScript configuration
└── package.json        # Project metadata and dependencies

Running the Project

  1. Build the project:

    npm run build
  2. Start the server:

    npm start

    Alternatively, you can use the development mode which will automatically restart the server on file changes:

    npm run dev

The server will be running on http://localhost:3000.

Scripts

  • build: Compiles the TypeScript files into JavaScript in the dist/ directory.

    npm run build
  • start: Runs the compiled app from the dist/ folder using Node.js.

    npm start
  • dev: Runs the app in development mode with nodemon, watching for file changes.

    npm run dev
  • lint: Lints the project using ESLint with TypeScript extensions.

    npm run lint

License

Do whatever you want to this repo.

About

This is a minimal starter project to build an API using Express.js with TypeScript. It includes a basic project structure, essential TypeScript configuration, and basic scripts for development.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published