Skip to content

webevaluator/gobackend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golang Backend

Introduction

This repo contains the Go backend server code which by default runs locally on the port 8080.

Deployed Link

https://gowebevaluator.onrender.com/status

Pre-requisites

Your machine should have golang version 1.17 or above, Npm(or Yarn) and Node.js installed to use it locally.

Setting up the repository locally

  1. Fork the repo to your account.

  2. 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 [email protected]:<YOUR_GITHUB_USERNAME>/gobackend.git (ssh)
  1. Change directory to gobackend.
cd gobackend
  1. 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	[email protected]:<YOUR_GITHUB_USERNAME>/gobackend.git (fetch)
origin	[email protected]:<YOUR_GITHUB_USERNAME>/gobackend.git (push)
  1. Add remote upstream by running the below command:
git remote add upstream https://github.com/webevaluator/gobackend.git (https)

or

git remote add upstream [email protected]:webevaluator/gobackend.git (ssh)
  1. 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	[email protected]:<username>/gobackend.git (fetch)
origin	[email protected]:<username>/gobackend.git (push)
upstream	[email protected]:webevaluator/gobackend.git (fetch)
upstream	[email protected]:webevaluator/gobackend.git (push)

Run locally

  • 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.