mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-10 22:16:28 +00:00
Add web server for Heroku
This commit is contained in:
parent
86f2e37ad7
commit
8f016c0856
2 changed files with 19 additions and 0 deletions
1
Procfile
1
Procfile
|
@ -1 +1,2 @@
|
|||
renovate: node renovate
|
||||
web: node bin/heroku/web.js
|
||||
|
|
18
bin/heroku/web.js
Normal file
18
bin/heroku/web.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
/* eslint-disable no-console */
|
||||
const http = require('http');
|
||||
|
||||
const port = process.env.PORT || '3000';
|
||||
|
||||
const requestHandler = (request, response) => {
|
||||
// Redirect users to Heroku dashboard
|
||||
response.writeHead(302, { Location: 'https://dashboard.heroku.com/apps' });
|
||||
response.end();
|
||||
};
|
||||
|
||||
http.createServer(requestHandler).listen(port, (err) => {
|
||||
if (err) {
|
||||
console.log('Failed to start web server', err);
|
||||
return;
|
||||
}
|
||||
console.log(`Web server is listening on ${port}`);
|
||||
});
|
Loading…
Reference in a new issue