1.0.7 • Published 10 months ago

expresss-ts v1.0.7

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

Express TypeScript Starter

This is a starter project for building a backend application with Express and TypeScript.

Features

  • Express server setup
  • TypeScript configuration
  • Nodemon for development
  • Health check route
  • ESLint for linting
  • Proper project structure

Installation

To install the package globally, run:

pnpm install -g expresss-ts@latest

To run the package without installing, use:

pnpm dlx expresss-ts@latest <project-name>

To install the package globally, run:

npm install -g expresss-ts@latest

To run the package without installing, use:

npx expresss-ts@latest <project-name>

Getting Started

Note: This project uses pnpm as the default package manager. If you prefer using other package managers, you can replace pnpm with your preferred package manager in the scripts.

  1. Clone this repository
  2. Run pnpm install to install dependencies
  3. Create a .env file in the root directory and add your environment variables (see .env.example)
  4. Run pnpm dev to start the development server
  5. Visit http://localhost:5555/api/health to check if the server is running

Scripts

  • pnpm dev: Start the development server with Nodemon
  • pnpm build: Build the TypeScript code
  • pnpm start: Start the production server
  • pnpm lint: Run ESLint

Project Structure

src/
├── controllers/
│   ├── health.controllers.ts
│   └── example.controllers.ts
├── db/
│   └── connection.ts
├── models/
│   └── example.model.ts
├── routes/
│   ├── health.routes.ts
│   └── example.routes.ts
├── types/
│   └── example.types.ts
├── utils/
│   ├── ApiError.ts
│   ├── ApiResponse.ts
│   ├── AsyncHandler.ts
│   └── example.utils.ts
└── index.ts

License

This project is licensed under the MIT License. See the LICENSE file for more details. Feel free to use this project or fork it on GitHub.

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago