Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main #6

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
25 changes: 16 additions & 9 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
// Module Dependencies
// -------------------
var express = require('express');
var express = require('express');
var bodyParser = require('body-parser');
var errorhandler = require('errorhandler');
var http = require('http');
Expand All @@ -14,13 +14,16 @@ var app = express();

// Configure Express
app.set('port', process.env.PORT || 3000);
app.use(bodyParser.json({type: 'application/json'}));
//app.use(bodyParser.urlencoded({ extended: true }));

//app.use(bodyParser.json());
//app.use(bodyParser.json({type: 'application/json'}));
//app.use(express.urlencoded());
//app.use(express.methodOverride());
//app.use(express.favicon());

app.use(express.static(path.join(__dirname, 'public')));
app.use(express.urlencoded({ extended: false }));
app.use(express.json());

app.use(express.static(path.join(__dirname, '/public')));

// Express in Development Mode
if ('development' == app.get('env')) {
Expand All @@ -33,10 +36,14 @@ app.post('/login', routes.login );
app.post('/logout', routes.logout );

// Custom Hello World Activity Routes
app.post('/journeybuilder/save/', activity.save );
app.post('/journeybuilder/validate/', activity.validate );
app.post('/journeybuilder/publish/', activity.publish );
app.post('/journeybuilder/execute/', activity.execute );
//app.post('/journeybuilder/save/', activity.save );
//app.post('/journeybuilder/validate/', activity.validate );
//app.post('/journeybuilder/publish/', activity.publish );
//app.post('/journeybuilder/execute/', activity.execute );
app.post('/save/', activity.save );
app.post('/validate/', activity.validate );
app.post('/publish/', activity.publish );
app.post('/execute/', activity.execute );

http.createServer(app).listen(app.get('port'), function(){
console.log('Express server listening on port ' + app.get('port'));
Expand Down
Loading