Skip to main content

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​

  1. Run the SSO configuration command:
    aws configure sso
  2. Configure with these settings:
    • Profile name: 1courier
    • Start URL: https://1courier.awsapps.com/start#/
    • Region: ca-central-1
    • Output Format: json

AWS CodeCommit Setup​

  1. Install pip following the guide at pip installation
  2. Install CodeCommit:
    pip install git-remote-codecommit

Getting Started​

Repository Setup​

  1. Clone the repository:

    git clone codecommit://1courier@backend
  2. Navigate to the backend directory:

    cd backend
  3. Install dependencies:

    npm install

Running the Application​

AWS SSO Login​

note

You need to perform these steps each time you get logged out.

  1. Login using your AWS profile:
    aws sso login --profile 1courier
  2. Complete the authorization in your browser when prompted.

Starting the Backend​

Run the application using:

make run

Contributors​