Skip to content

Commit de17b8b

Browse files
Merge pull request #7 from shipwright-io/sascha-heroku-compatility
Add Procfile for Heroku example
2 parents e75e49a + d759021 commit de17b8b

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

source-build-heroku/Procfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: node app.js

source-build-heroku/app.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// From https://github.com/homeport/gonut/tree/master/assets/sample-apps/nodejs
2+
3+
var port = (process.env.PORT || 8080);
4+
var http = require('http');
5+
6+
http.createServer(function (req, res) {
7+
res.writeHead(200, { 'Content-Type': 'text/plain' });
8+
res.end('Hello, World!\n');
9+
}).listen(port);

source-build-heroku/package.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "nodejs-sample-app",
3+
"description": "NodeJS sample app",
4+
"version": "0.0.1",
5+
"engines": {
6+
"node": "~20"
7+
}
8+
}

0 commit comments

Comments
 (0)