-
Install Dependencies
npm install
-
Set Up MySQL Database
-
Using Docker (Recommended) Run the following command to start MySQL using Docker Compose:
docker-compose up -d
-
Without Docker Ensure you have a MySQL server running locally. Update the database connection settings in the
.env
file.
-
-
Create .env File
Create a new file named
.env
in the root of your project and configure the environment variables:DB_HOST=localhost DB_PORT=3306 DB_USERNAME=root DB_PASSWORD=root DB_NAME=your_database_name
-
Build and Run
# To convert TypeScript to JavaScript npm run build # To start the server npm rundev
-
Run Prettier for Code Formatting:
npm run format
-
Check for Linting Errors:
npm run lint
-
Automatically Fix Fixable Issues:
npm run lint:fix
- Make sure to update the
.env
file with appropriate database connection details. - The
npm rundev
command is used to start the server in development mode with auto-reloading.
Feel free to explore and modify the project based on your requirements! If you encounter any issues, refer to the documentation of TypeORM and MySQL.