An awesome project based on the Ts.ED framework, providing a strong foundation to kickstart your Node.js API development with TypeScript.
- Node.js (version 14.x or higher)
- Yarn package manager
- Clone the repository:
git clone git@github.com:raphaelvserafim/base-server-ts.git
cd base-server-ts
- Install dependencies:
yarn install
To start the server in development mode with live reload:
yarn start
To build the project for production and run it:
yarn build
yarn start:prod
A brief overview of the project structure:
- src/: Contains all source code files.
- config/: Configuration files for the project.
- controllers/: API and page controllers.
- views/: EJS templates for server-side rendering.
- dist/: Compiled code after running the build.
- build: Compiles the TypeScript code.
- start: Runs the server in development mode.
- start:prod: Runs the server in production mode.
- test: Runs linting and unit tests.
- barrels: Organizes module exports using Barrelsby.
To manage the application with PM2:
pm2 startup
pm2 start npm --name server-base-ts-dev -- run "start"
pm2 start npm --name server-base-ts-prod -- run "start:prod"
pm2 save
Contributions are welcome! Feel free to open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.