Coding Task
baseurl = localhost:3000
- Fetches all farm units
- Creates farm-units for existing farm building
- Updates farm-units by id with restricted time interval updates
- Fetches farm-units for a particular farm building
- Fetches all farm building
- Creates farm-buildings
- sudo docker build -t e.g docker build -t farm-simulator .
Exposed ports 3000 8001 8080 8100
- sudo docker run -d -p : --env-file sudo docker run -d -p 3000:3000 --env-file ./.env --name farm-manager farm-simulator
- sudo docker exec -it farm-manager bash
- npx sequelize-cli db:migrate
- npx sequelize-cli db:seed:all
docker container run --rm --detach --name=farm-manager-db --env POSTGRES_DB=farm_manager --env POSTGRES_PASSWORD=mysecretpassword postgres
- sudo docker network create farm-manager-network
- sudo docker network connect farm-manager-network farm-manager-db
- Confirm if farm-manager-db is connected to network: docker network inspect --format='{{range .Containers}} {{.Name}} {{end}}' farm-manager-network
- sudo docker container run --rm --detach --name farm-manager --publish 3000:3000 --network farm-manager-network --env-file ./.env farm-simulator
- sudo docker exec -it farm-manager bash
- npx sequelize-cli db:migrate
- npx sequelize-cli db:seed:all
AirBnB;s styling brings about neatness, simplicity and gives a very fast option when a developer is focusing on code logic than looking out for why a syntaxing rule is not current. I used it specifically and avoided using es-lint extension due to my recent health conditions and focused more using a very simple extension.