Skip to content

Commit 8a63403

Browse files
committed
new example
1 parent b21c7d9 commit 8a63403

4 files changed

Lines changed: 47 additions & 0 deletions

File tree

heroku/Procfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: node release.js

heroku/controllers/default.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
exports.install = function(framework) {
2+
framework.route('/', plain_homepage);
3+
};
4+
5+
function plain_homepage() {
6+
var self = this;
7+
self.plain('total.js on Heroku.');
8+
}

heroku/readme.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Deploy total.js app on Heroku
2+
3+
- __release.js__ is an initial script
4+
- __Procfile__ is for Heroku (their internal service)
5+
6+
## Important
7+
8+
- __config-release__ can't contain parameter: ~~default-ip~~ and ~~default-port~~
9+
10+
## Deploy (first)
11+
12+
> Heroku documentation: https://devcenter.heroku.com/articles/getting-started-with-nodejs
13+
14+
```
15+
$ git init
16+
$ git add .
17+
$ git commit -m "first commit"
18+
$ git push heroku master
19+
```
20+
21+
## Deploy (update)
22+
23+
```
24+
$ git add .
25+
$ git commit -m "next update"
26+
$ git push heroku master
27+
```
28+
29+
## Watch Heroku live logs
30+
31+
```
32+
$ heroku logs
33+
```

heroku/release.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
var framework = require('total.js');
2+
var http = require('http');
3+
4+
// Debug mode = false
5+
framework.run(http, false, parseInt(process.env.PORT || 5000), 'heroku');

0 commit comments

Comments
 (0)