Coder Social home page Coder Social logo

deporter's Introduction

TypeScript x Express x Node.js

This repository contains a basic TypeScript Express application that utilizes Node.js for server-side functionality. It is configured with Nodemon for automatic server restarts during development and uses ts-node for TypeScript execution.

If you are not familiar with a TypeScript workflow, consider checking out the JavaScript branch of this repository.

Feeling lost? Go through the tutorial that this repository is built upon.

Monitoring the Changes Detected By Nodemon

Prerequisites

Before you begin, ensure you have the following installed on your machine:

  • Node.js: Ensure that Node.js, preferably version 16 or higher, is installed on your system, as this project utilizes the latest versions of TypeScript and Nodemon.
  • npm: npm is the package manager for Node.js and comes with the Node.js installation.

Installation

Clone the repository to your local machine:

git clone https://github.com/c99rahul/ts-node-express.git

Navigate to the project directory:

cd ts-node-express/

Install the project dependencies including TypeScript and Nodemon:

npm i

Usage

For development purposes, you can run the application using Nodemon to automatically restart the server when changes are detected. Execute the following command:

npm run dev

This will start the server at http://localhost:3000 by default. You can change the port in the src/index.ts file or create an .env file to manage the environt-specific variables separately.

For production, you can build the TypeScript files and then start the server. Run the following commands:

npm run build
npm start

Project Structure

The project structure is organized as follows:

  • src: Contains TypeScript source files
    • index.ts: Configures and starts the Express application
  • dist: Output directory created during build for compiled TypeScript files
  • package.json: Project configuration and dependencies
  • tsconfig.json: TypeScript configuration

You can customize the project configuration i nthe tsconfig.json file and adjust the server settings in the src/index.ts file.

License

This project is licensed under the MIT License - see the LICENSE file for details.

deporter's People

Contributors

dyu5 avatar neosh11 avatar

Watchers

 avatar David Yu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.