Minimum software required to run the service:
git clone https://github.com/Lineblocs/internals-api.git
internals-api uses echo framework which is high performance, extensible, minimalist Go framework.
- router initiate echo and set basic configuration.
- handler configure routings and bind all services including admin, call, carrier, debit, fax, logger, recording, user
- store each services are declared with interface in their own package and implemenations are defined in store package.
- model includes all models which can be used in services.
Newman is built on Node.js. To run Newman, make sure you have Node.js installed.
sudo apt update
sudo apt install nodejs
node -v
npm install -g newman
Running Newsman via Postman collection
newman run https://api.getpostman.com/collections/myPostmanCollectionUid?apikey=myPostmanApiKey
collectionUid = 25298469-50f49cbd-43c7-459a-9052-706e8d7c002f
apiKey = PMAK-63c11b3766698c5953a3333b-bc04bedd1b5fb17cba12cae7c1de9018ec
API uses default 80 port for HTTP and 443 for HTTPS You Configure ports with HTTP_PORT and HTTPS_PORT environment variable. export HTTP_PORT=80 export HTTPS_PORT=443
Debugging issues by tracking logs
There are 4 log channels including console, file, cloudwatch, logstash Set LOG_DESTINATIONS variable in .env file
ex: export LOG_DESTINATIONS=console,file
Config .golangci.yaml file to add or remote lint options
Config .pre-commit-config.yaml file to enable or disable pre-commit hook
sudo apt-get update
sudo apt-get upgrade
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C5AD17C747E3415A3642D57D77C6C491D6AC1D69
echo "deb https://dl.k6.io/deb stable main" | sudo tee /etc/apt/sources.list.d/k6.list
sudo apt-get update
sudo apt-get install k6
k6 run loadtest.js
- Install Docker on the machines you want to use it;
- Set up a registry at Docker Hub;
- Initiate Docker build to create your Docker Image;
- Set up your ’Dockerized‘ machines;
- Deploy your built image or application.
docker build -t internals-api