ALPHA Release
Kairos ID Signature Proxy responsible for signing Kairos API responses when using the Human Identity Interface™.
-
node
/npm
-
yarn
$ git clone [email protected]:kairosinc/id-signature-proxy.git
# Cloning into 'id-signature-proxy'...
# remote: Counting objects: 3, done.
# remote: Compressing objects: 100% (2/2), done.
# remote: Total 3 (delta 0), reused 3 (delta 0), pack-reused 0
# Receiving objects: 100% (3/3), done.
$ yarn install
# yarn install v1.5.1
# [1/4] 🔍 Resolving packages...
# ... install all the things
# ✨ Done in 0.54s.
$ yarn setup
# yarn run v1.5.1
# $ cp .env.example .env
# ✨ Done in 0.11s.
Then open .env-ci
and set to your heart's content
The proxy server repository includes a Dockerfile
for easy integration
with an existing container infrastructure.
make build
make run
Migrate the Dockerfile instructions and the Docker Compose parameters to your existing infrastructure to host the proxy server.
To start a development environment:
$ yarn develop
# yarn run v1.5.1
# $ nodemon --exec babel-node src
# [nodemon] 1.17.1
# [nodemon] to restart at any time, enter `rs`
# [nodemon] watching: *.*
# [nodemon] starting `babel-node src`
# ID Signature Proxy server running on 8000.
To build a production application:
$ yarn build
# yarn run v1.5.1
# $ rimraf lib && babel src -d lib
# ... building files
# ✨ Done in 1.07s.
To run the production application:
$ yarn start
# yarn run v1.5.1
# $ node lib
# ID Signature Proxy server running on 8000.
To lint the src/
directory:
$ yarn lint
# yarn run v1.5.1
# $ eslint src
# ✨ Done in 1.07s.
To execute yarn lint
:
$ yarn precommit
# yarn run v1.5.1
# $ yarn lint
# $ eslint src
# ✨ Done in 1.36s.
To execute yarn build && yarn lint
:
$ yarn prepush
# yarn run v1.5.1
# $ yarn build && yarn lint
# $ rimraf lib && babel src -d lib
# ... building files
# $ eslint src
# ✨ Done in 2.87s.
The application contains a few components:
api/
config/
controllers/
proxy/
routes.js
server.js
api/
is the container surrounding the rest of the application.
config/
is a folder for constants and api-internal configuration.
controllers/
contains files which are intended to execute upon specific API route calls.
proxy/
is where application-specific business logic lives.
routes.js
define routes that execute controller methods.
server.js
creates our HTTP server.
We'd love to hear feedback from you and we're also here to help if you have any questions — feel free to email our support team.