The backend of this project is written in Go.
- Anurag Shenoy
- Ganesan Santhanam
We will try to adhere to Domain Driven Design (DDD) pattern. See more here: https://www.citerus.se/go-ddd/
- Go version
1.17.x
(1.17.6
is used for this project) - MongoDB version
5.x.x
(5.0.4
to be exact) - MongoDB Database Tools version
100.5.1
Install version 1.17.6
from https://go.dev/ using the steps given here: https://go.dev/doc/install.
It is recommended to use a package manager such as homebrew
(for MacOS https://brew.sh/) or the relevant package manager for your OS.
For MacOS: If using brew, run the command brew install [email protected]
to install version 1.17.x. More on how to install Go using brew here: https://formulae.brew.sh/formula/go.
Install version 5.0.4
of MongoDB using the steps given here: https://docs.mongodb.com/manual/installation/ or you can download the correct file from https://www.mongodb.com/download-center/community/releases/archive if the version is an older one.
Install the mongo database tools from https://docs.mongodb.com/database-tools/installation/installation/. This project uses version 100.5.1
of MongoDB Database Tools.
- After installing MongoDB, run the
mongod
daemon/service using the instructions from here https://docs.mongodb.com/manual/installation/. - De-compress the db from the
db.zip
file provided in the repo. - Restore the db using the
mongorestore
command like somongorestore db/
. An example using options:mongorestore --host <host> --port <port number> <path to the backup>
and replace the values within<>
appropriately. For eg.mongorestore --host 127.0.0.1 --port 27017 /Path/to/database/folder
.
More information on mongorestore
command can be found here: https://docs.mongodb.com/database-tools/mongorestore/.
And that's it! You have setup MongoDB service and restored the database.
main.go
file (within backend folder) contains the code that will start the server. The server can be started using these commands:
cd backend/
go run main.go
.
Now, you can follow the steps to get the frontend up and running and check out the web-app.