This repo contains the Go backend server code which by default runs locally on the port 8080.
https://gowebevaluator.onrender.com/status
Your machine should have golang version 1.17 or above, Npm(or Yarn) and Node.js installed to use it locally.
-
Fork the repo to your account.
-
Clone your forked repo to your local machine: Replace
<YOUR_GITHUB_USERNAME>
with your actual GitHub username in the below command. This will clone the code to your local machine.
git clone https://github.com/<YOUR_GITHUB_USERNAME>/gobackend.git (https)
or
git clone git@github.com:<YOUR_GITHUB_USERNAME>/gobackend.git (ssh)
- Change directory to
gobackend
.
cd gobackend
- Check the remote of your local repo by:
git remote -v
It should output the following:
origin https://github.com/<YOUR_GITHUB_USERNAME>/gobackend.git (fetch)
origin https://github.com/<YOUR_GITHUB_USERNAME>/gobackend.git (push)
or
origin git@github.com:<YOUR_GITHUB_USERNAME>/gobackend.git (fetch)
origin git@github.com:<YOUR_GITHUB_USERNAME>/gobackend.git (push)
- Add remote upstream by running the below command:
git remote add upstream https://github.com/webevaluator/gobackend.git (https)
or
git remote add upstream git@github.com:webevaluator/gobackend.git (ssh)
- Running
git remote -v
should then print the following:
origin https://github.com/<username>/gobackend.git (fetch)
origin https://github.com/<username>/gobackend.git (push)
upstream https://github.com/webevaluator/gobackend.git (fetch)
upstream https://github.com/webevaluator/gobackend.git (push)
or
origin git@github.com:<username>/gobackend.git (fetch)
origin git@github.com:<username>/gobackend.git (push)
upstream git@github.com:webevaluator/gobackend.git (fetch)
upstream git@github.com:webevaluator/gobackend.git (push)
- For installing dependencies run
go install
npm install -g nodemon
- For starting the server run:
nodemon --exec go run main.go --signal SIGTERM
It will start the server at localhost:8080
. You can check the server status at localhost:8080/status
.