Backend Setup Guide
This guide will help you set up and run the Backend System.
Prerequisites
Go Installation
To install GoLang, follow the official installation guide at https://go.dev/doc/install
Beego Setup
You will need to install or upgrade Beego and the Bee dev tool:
go install -u github.com/beego/beego/v2
go install -u github.com/beego/bee/v2
For convenience, add $GOPATH/bin to your $PATH environment variable. Make sure you have already set the $GOPATH environment variable.
If you haven't set $GOPATH, add it to your shell configuration:
# For ~/.zsh
echo 'export GOPATH="$HOME/go"' >> ~/.zsh
If you have already set $GOPATH:
# Add to your shell configuration file
echo 'export PATH="$GOPATH/bin:$PATH"' >> ~/.profile
exec $SHELL
AWS Setup
Installing AWS-CLI
Follow the official AWS CLI installation guide at AWS CLI Installation Documentation
Configuring AWS Profile
- Run the SSO configuration command:
aws configure sso - Configure with these settings:
- Profile name:
1courier - Start URL:
https://1courier.awsapps.com/start#/ - Region:
ca-central-1 - Output Format:
json
- Profile name:
AWS CodeCommit Setup
- Install pip following the guide at pip installation
- Install CodeCommit:
pip install git-remote-codecommit
Getting Started
Repository Setup
-
Clone the repository:
git clone codecommit://1courier@backend -
Navigate to the backend directory:
cd backend -
Install dependencies:
npm install
Running the Application
AWS SSO Login
note
You need to perform these steps each time you get logged out.
- Login using your AWS profile:
aws sso login --profile 1courier - Complete the authorization in your browser when prompted.
Starting the Backend
Run the application using:
make run
Contributors
- Gnanakeethan (keethan@1courier.com)