ag-api v1.0.0
node-docker-heroku-cicd
A test repo for setting up CICD from a node application to be published on heroku
Install
npm installBuild
docker build . -t node-docker-heroku-cicdTest
docker run -p 3000:3000 node-docker-heroku-cicd npm run test Start
docker run -p 3000:3000 node-docker-heroku-cicd npm run startBrowse
go to https://localhost:3001 for Swagger UI API documentation go to https://localhost:3001/api-docs
Stop
find container ID
docker psusing container ID from previous command
docker stop <container ID>Building the client
This project uses OpenAPI Generator to generate client code for the Algorithm API
There is a GitHub action configured to generate and publish this client to the NPM registry, if for some reason you need to do this manually follow the steps below.
Generate the client
npx openapi-generator-cli generate -g javascript --additional-properties=usePromises=true -o client -i ./src/public/api.jsonthis client can then be published to the NPM registry to be used by the UI, you will require an NPM account to publish
if you have not added your user credentials to local NPM yet you will need to do that first, follow the prompts after invoking the following
npm adduserlog into NPM registry
npm loginpublish
npm publishit is not possible to republish packages to the NPM registry, if you need to publish changes be sure to update the version according to semver rules, most likely you will just need to bump the patch version of the OpenAPI specification at /src/api.json
5 years ago