Running API Server
September 4, 2023 ยท View on GitHub
This document explains how you can setup a development environment for ILLA Builder API server.
Pre-requisites
Local Setup
-
Setup the PostgreSQL database
- Running the script to create the database and tables
-
Setup the
illa-supervisor-backend- Following the setup steps in illa-supervisor-backend
-
Change the default env config
Change the default env config in
pkg/db/connection.goto the PostgreSQL config.Change the default env config in
internal/util/supervisior/token_validator.goto theilla-supervisor-backendconfig. -
Running the ILLA Builder API server
go run github.com/illacloud/builder-backend/cmd/http-serverThis will start the ILLA Builder API server on
http://127.0.0.1:8001. -
Extract the JWT token for the user
rootcurl 'http://{{illa-supervisor-backend-addr}}/api/v1/auth/signin' --data-raw '{"email":"root","password":"password"}' -vGet the value of response header
illa-tokenas the next API call'sAuthorizationheader value. -
Test the API server
curl 'http://127.0.0.1:8001/api/v1/teams/:teamID/apps' -H 'Authorization: {{Value of response header `illa-token`}}'The value of
:teamIDisILAfx4p1C7d0.
Need Assistance
- If you are unable to resolve any issue while doing the setup, please feel free to ask questions on our Discord channel or initiate a Github discussion. We'll be happy to help you.
- In case you notice any discrepancy, please raise an issue on Github.