Skip to content

Commit

Permalink
heroku init
Browse files Browse the repository at this point in the history
  • Loading branch information
kg0r0 committed Aug 7, 2020
1 parent dca7c7b commit 01422f2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions issuer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ To issue a verifiable credential, run the website and navigate to the homepage.
2. In Authenticator, add an account and choose **Other account**. Scan the QR code.
3. Follow the instructions to receive your verifiable credential.

## RUN the sample (Heroku)

1. Provision an app with `heroku create`
2. Deploy with `git subtree push --prefix issuer/ heroku master`
3. Set environment variable with `heroku config:add APP_NAME=[APP NAME]`

## Modifying the code to use your issuer

If you've created your own issuer following our [documentation](https://aka.ms/didfordevs), you can edit the code in `app.js` to use your issuer.
Expand Down
4 changes: 2 additions & 2 deletions issuer/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ const crypto = new CryptoBuilder(did, signingKeyReference).build();
//////////// Main Express server function
// Note: You'll want to update the hostname and port values for your setup.
const app = express()
const port = 8081
const host = 'https://d7ed8827238f.ngrok.io'
const port = process.env.PORT
const host = `https://${process.env.APP_NAME}.herokuapp.com`

// Serve static files out of the /public directory
app.use(express.static('public'))
Expand Down
3 changes: 2 additions & 1 deletion issuer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node app.js"
},
"author": "",
"license": "ISC",
Expand Down

0 comments on commit 01422f2

Please sign in to comment.