Serverless backend
Docs (prod) [TBD]: https://api.docs.ntuscse.com
Docs (dev) [TBD]: https://api.docs.dev.ntuscse.com
API (prod) [TBD]: https://api.ntuscse.com
API (dev): https://api.dev.ntuscse.com
If you don't have node currently installed on your system, use the following steps to install:
- To use the installer, click here
- Alternatively, you can install node using the terminal:
$ brew install node
$ sudo apt-get install -y nodejs
See the instructions to install via your distro's package manager here.
Run as admin:
$ choco install nodejs.install
To verify node installation, you can use the following command in your terminal/cmd:
$ node -v
If you don't have python currently installed on your system, use the following steps to install:
- To use the installer, click here
- Alternatively, on macOS you can install python using the terminal:
Install Homebrew, and then write the following command in your terminal:
$ brew install python
To verify python installation, you can use the following command on your terminal/cmd:
$ python --version
If you already have an older version of python installed on your system, you can update it using the online installer (linked above) or by entering the following commands on your terminal/cmd:
$ brew update && brew upgrade python
Install conda via https://conda.io/miniconda.html, and then run the following commands:
$ conda update python
OR
$ conda install python=<version-number>
Run the following command on your terminal/cmd:
$ curl -sSL https://install.python-poetry.org | python3 -
$ (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -
You can install the AWS CLI using the online installer, or by using the terminal/cmd:
$ curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
$ sudo installer -pkg AWSCLIV2.pkg -target /
$ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
$ unzip awscliv2.zip
$ sudo ./aws/install
$ msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi
To verify installation and check version, use:
$ aws --version
You can use the following guide to refer to docs related to generating AWS credentials and configuring the CLI for use on your system
Run the following commands to install the necessary node and python dependencies in your environment and run the serverless app offline:
$ npm run setup
$ npm run offline
Create a dotenv file and follow the format as shown in stub.env
Run the following command to run tests:
$ npm run test
To run tests in watch mode:
$ npm run test:watch