A simple plug and play Node micro-service to provide an authentication layer for any project.
-
Install Docker on your manchine.
-
Clone this repository
git clone git@github.com:clout-stack/clout-auth-server.git
-
start the build server
cd clout-auth-server docker-compose up
-
Understand the variables and configure them to point to your production services
ENV variable Description NODE_ENV e.g production,development,testNODE_PORT e.g 80REDIS_HOST e.g redislabs.comMONGODB_HOST e.g. redislabs.comMONGODB_USER e.g. USERNAMEMONGODB_PASS e.g. PASSWORDSESSION_SECRET e.g. SECRETJWT_SECRET_KEY e.g. SECRETJWT_EXPIRES_IN e.g. 7NODE_DEBUG e.g. clout-js:* -
Run clout-auth-server container in your machine
To use Clout PaaS, ensure you have;
- an account
- clout-cli
You can deploy this application to clout PaaS following these steps.
-
Create a
clout.jsonfile with the following contents{ "depends_on": ["mysql", "redis"], "environment": { "NODE_DEBUG": "", "NODE_ENV": "production", "SESSION_SECRET": "mysecret", "JWT_SECRET_KEY": "mysecretjwt", "JWT_EXPIRES_IN": "7" } } -
Deploy this application to clout PaaS
clout publish --project-dir .