Follow these steps to install the project:
-
Clone the repository to your local machine:
git clone [email protected]:renehauck/lekkercode.git
-
Navigate to the server directory:
cd my-express-server
-
Install the dependencies:
yarn install
Here are some commands you can use:
-
To start the server in development mode:
yarn start
The server will be started on port 3000 and will automatically recompile and restart upon changes to the source code.
-
To run the tests:
yarn test
-
To compile the TypeScript code to JavaScript:
yarn build
-
To build the Docker image:
yarn docker-build
-
To run the application in a Docker container:
yarn docker-run
-
To start the application using Docker Compose:
yarn docker-compose
Url is http://localhost:3000/api
you can find the swagger documentary at http://localhost:3000/api-docs/
The .env
file is presented in the repository but must be added to the .gitignore
file in production.
In production, I switched to the NestJS framework.
- Implementing end-to-end (e2e) tests would be interesting.
- Additional validation using Yup would be beneficial.