Skip to content

A TypeScript and Express.js starter kit for web development.

License

Notifications You must be signed in to change notification settings

shouryaraj/ts-express-starter

Repository files navigation

Cool Banner

TypeScript Express Base - Starter Kit

Node.js TypeScript Express

TypeScript Express Base is an open-source starter kit for building web applications with TypeScript and Express.js. It provides a solid foundation for creating RESTful APIs or web services with robust and maintainable code.

Features

Features

  • TypeScript: Write your code in TypeScript for strong typing and improved development experience. Learn more about TypeScript here.
  • Express.js: A fast, minimal, and flexible Node.js web application framework to build robust APIs.
  • Prettier & ESLint: Code formatting and linting tools to maintain a consistent coding style. Explore Prettier here and ESLint here.
  • Environment Variables: Load environment variables from a .env file for configuration. Check out the dotenv library here.
  • Nodemon: Automatically restart the server during development for a seamless development experience. Learn more about Nodemon here.
  • Dependency Management: Manage your project's dependencies and scripts with Yarn or npm. Explore Yarn here and npm here.

Getting Started

Follow these steps to use this starter kit for your project:

  1. Clone the Repository:
git clone https://github.com/yourusername/typescript-express-base.git your-app-name
cd your-app-name
  1. Install Dependecy:

Use your preferred package manager to install project dependencies.

Using npm:

npm install

Using Yarn:

yarn
  1. Configuration:

Create a .env file in the root directory to set your environment-specific variables. Customize ESLint and Prettier configurations in .eslintrc.js and .prettierrc.js, respectively, as needed.

  1. Start the Application:
  • For development:

Using npm:

npm run start:dev

Using Yarn:

yarn start:dev
  • For production:

Using npm:

npm run start:prod

Using Yarn:

yarn start:prod
  1. Access Your Application:

Visit http://localhost:3000/health in your browser, and you'll see "Hello, Express app is healthy!" if everything is set up correctly.

Author

Bugdebugger

Acknowledgments

  • Express.js
  • TypeScript
  • Prettier
  • ESLint
  • dotenv