This repository has been archived by the owner on Jul 15, 2019. It is now read-only.
forked from isao/mojito-cli-create
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
221 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/*jslint nomen:true, node:true*/ | ||
|
||
var express = require('express'), | ||
libmojito = require('mojito'), | ||
app; | ||
|
||
app = express(); | ||
|
||
// Set the port to listen on. | ||
app.set('port', process.env.PORT || {{port}}); | ||
|
||
// Create a new Mojito instance and attach it to `app`. | ||
// Options can be passed to `extend`. | ||
libmojito.extend(app, { | ||
context: { | ||
environment: "development" | ||
} | ||
}); | ||
|
||
// Load the built-in middleware or any middleware | ||
// configuration specified in application.json | ||
app.use(libmojito.middleware()); | ||
|
||
|
||
|
||
// Load routes configuration from routes.json | ||
app.mojito.attachRoutes(); | ||
|
||
// Allow anonymyous mojit instances w/ actions to be dispatched | ||
app.get('/:mojit/:action', libmojito.dispatch("{mojit}.{action}")); | ||
|
||
app.listen(app.get('port'), function () { | ||
console.log('Server listening on port ' + app.get('port') + ' ' + | ||
'in ' + app.get('env') + ' mode'); | ||
}); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
[ | ||
{ | ||
"settings": [ "master" ], | ||
"appPort": "{{port}}", | ||
"specs": {} | ||
}, | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/*jslint nomen:true, node:true*/ | ||
|
||
var express = require('express'), | ||
libmojito = require('mojito'), | ||
app; | ||
|
||
app = express(); | ||
|
||
// Set the port to listen on. | ||
app.set('port', process.env.PORT || {{port}}); | ||
|
||
// Create a new Mojito instance and attach it to `app`. | ||
// Options can be passed to `extend`. | ||
libmojito.extend(app, { | ||
context: { | ||
environment: "development" | ||
} | ||
}); | ||
|
||
// Load the built-in middleware or any middleware | ||
// configuration specified in application.json | ||
app.use(libmojito.middleware()); | ||
|
||
// Load routes configuration from routes.json | ||
app.mojito.attachRoutes(); | ||
|
||
// Allow anonymyous mojit instances w/ actions to be dispatched | ||
app.get('/:mojit/:action', libmojito.dispatch("{mojit}.{action}")); | ||
|
||
app.listen(app.get('port'), function () { | ||
console.log('Server listening on port ' + app.get('port') + ' ' + | ||
'in ' + app.get('env') + ' mode'); | ||
}); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/*jslint nomen:true, node:true*/ | ||
|
||
var express = require('express'), | ||
libmojito = require('mojito'), | ||
app; | ||
|
||
app = express(); | ||
|
||
// Set the port to listen on. | ||
app.set('port', process.env.PORT || {{port}}); | ||
|
||
// Create a new Mojito instance and attach it to `app`. | ||
// Options can be passed to `extend`. | ||
libmojito.extend(app, { | ||
context: { | ||
environment: "development" | ||
} | ||
}); | ||
|
||
// Load the built-in middleware or any middleware | ||
// configuration specified in application.json | ||
app.use(libmojito.middleware()); | ||
|
||
// Load routes configuration from routes.json | ||
app.mojito.attachRoutes(); | ||
|
||
// Allow anonymyous mojit instances w/ actions to be dispatched | ||
app.get('/:mojit/:action', libmojito.dispatch("{mojit}.{action}")); | ||
|
||
app.listen(app.get('port'), function () { | ||
console.log('Server listening on port ' + app.get('port') + ' ' + | ||
'in ' + app.get('env') + ' mode'); | ||
}); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
[ | ||
{ | ||
"settings": [ "master" ], | ||
"appPort": "{{port}}", | ||
"specs": {} | ||
}, | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/*jslint nomen:true, node:true*/ | ||
|
||
var express = require('express'), | ||
libmojito = require('mojito'), | ||
app; | ||
|
||
app = express(); | ||
|
||
// Set the port to listen on. | ||
app.set('port', process.env.PORT || {{port}}); | ||
|
||
// Create a new Mojito instance and attach it to `app`. | ||
// Options can be passed to `extend`. | ||
libmojito.extend(app, { | ||
context: { | ||
environment: "development" | ||
} | ||
}); | ||
|
||
// Load the built-in middleware or any middleware | ||
// configuration specified in application.json | ||
app.use(libmojito.middleware()); | ||
|
||
// Load routes configuration from routes.json | ||
app.mojito.attachRoutes(); | ||
|
||
app.listen(app.get('port'), function () { | ||
console.log('Server listening on port ' + app.get('port') + ' ' + | ||
'in ' + app.get('env') + ' mode'); | ||
}); | ||
|
||
module.exports = app; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
[ | ||
{ | ||
"settings": [ "master" ], | ||
"appPort": "{{port}}", | ||
"specs": {} | ||
}, | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
/*jslint nomen:true, node:true*/ | ||
|
||
var http = require('http'), | ||
app = require('./app'); | ||
|
||
/** | ||
* @token given by manhattan and used to emit that the app is ready | ||
*/ | ||
module.exports = function(config, token) { | ||
// send the application to Manhattan along with the token | ||
process.emit("application-ready", token, http.createServer(app)); | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/*jslint nomen:true, node:true*/ | ||
|
||
var express = require('express'), | ||
libmojito = require('mojito'), | ||
app; | ||
|
||
app = express(); | ||
|
||
// Set the port to listen on. | ||
app.set('port', process.env.PORT || 8666); | ||
|
||
// Create a new Mojito instance and attach it to `app`. | ||
// Options can be passed to `extend`. | ||
libmojito.extend(app, { | ||
context: { | ||
environment: "development" | ||
} | ||
}); | ||
|
||
// Load the built-in middleware or any middleware | ||
// configuration specified in application.json | ||
app.use(libmojito.middleware()); | ||
|
||
// Load routes configuration from routes.json | ||
app.mojito.attachRoutes(); | ||
|
||
app.listen(app.get('port'), function () { | ||
console.log('Server listening on port ' + app.get('port') + ' ' + | ||
'in ' + app.get('env') + ' mode'); | ||
}); | ||
|
||
module.exports = app; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,6 @@ | |
}, | ||
"dependencies": { | ||
"node-markdown": "*", | ||
"mojito": "*" | ||
"mojito": "~0.9" | ||
} | ||
} |
Oops, something went wrong.