Finalize the project
This commit is contained in:
parent
ea3d29ac68
commit
75b459b10f
22
README.md
22
README.md
|
|
@ -1,5 +1,19 @@
|
||||||
# MyFreight Assessment
|
# MyFreight Assessment
|
||||||
|
|
||||||
|
## How to run
|
||||||
|
Easiest way to run this project is using docker compose:
|
||||||
|
`docker compose up`
|
||||||
|
|
||||||
|
It is possible that this will give some database connection issues on the first try, but after a couple of seconds, it should automatically reconnect.
|
||||||
|
|
||||||
|
Alternatively, it is possible to use your own mysql database, and run the code locally:
|
||||||
|
|
||||||
|
1. Import the `database/entrypoint/init.sql` into your own database
|
||||||
|
2. Update the `.env` file with the database credentials
|
||||||
|
3. Run `npm ci` to install all npm packages
|
||||||
|
4. Run `npm run build` to build the nestjs application
|
||||||
|
5. Run `npm run start:prod` to start the nestjs application
|
||||||
|
|
||||||
## Receiving Tracking information
|
## Receiving Tracking information
|
||||||
When receiving Tracking information, the following steps need to be completed to process the data
|
When receiving Tracking information, the following steps need to be completed to process the data
|
||||||
```mermaid
|
```mermaid
|
||||||
|
|
@ -36,6 +50,10 @@ containerNumber:**string**
|
||||||
- Sending the actual notification, there should be a more general way to setup notifiers
|
- Sending the actual notification, there should be a more general way to setup notifiers
|
||||||
- Moving some variables to config files
|
- Moving some variables to config files
|
||||||
- when is a shipment "arriving soon"
|
- when is a shipment "arriving soon"
|
||||||
- database credentials (via an .env)
|
|
||||||
- mock date
|
- mock date
|
||||||
-
|
- Use the uuid package
|
||||||
|
- was not possible since the uuid's from the sample data were invalid uuid's
|
||||||
|
- Add end-to-end tests as well
|
||||||
|
- Get shipments should be paginated
|
||||||
|
- Could use a package like typeorm-crud
|
||||||
|
- Cleanup duplicate OpenApi decorators, perhaps consolidate them in a custom decorator
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ services:
|
||||||
build: .
|
build: .
|
||||||
ports:
|
ports:
|
||||||
- "3001:3000"
|
- "3001:3000"
|
||||||
command: "npm run start:dev"
|
command: "npm run start:prod"
|
||||||
depends_on:
|
depends_on:
|
||||||
- database
|
- database
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
"start": "nest start",
|
"start": "nest start",
|
||||||
"start:dev": "nest start --watch",
|
"start:dev": "nest start --watch",
|
||||||
"start:debug": "nest start --debug --watch",
|
"start:debug": "nest start --debug --watch",
|
||||||
"start:prod": "node dist/main",
|
"start:prod": "node dist/src/main",
|
||||||
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test:watch": "jest --watch",
|
"test:watch": "jest --watch",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue