forked from cucumber-attic/gherkin-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.js
More file actions
31 lines (25 loc) · 785 Bytes
/
Copy pathserver.js
File metadata and controls
31 lines (25 loc) · 785 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
require.paths.unshift(__dirname + '/vendor/ace/build/src');
var express = require('express');
var app = express.createServer();
app.configure(function() {
app.use(express.logger());
app.use(express.static(__dirname + '/public'));
app.use(require('ace-connect').connect('/js/ace'));
app.use(require('./lib/connect').connect('/js/ge'));
app.use(require('gherkin').connect('/js'));
});
app.get('/', function(req, res, next) {
res.render('index', {
title: 'This is a test'
});
});
app.get('/partial', function(req, res, next) {
res.partial('nav');
});
app.get('/partial_html', function(req, res, next) {
res.partial('nav', function(err, html) {
res.send(html);
});
});
app.listen(8000);
console.log('Gherkin Editor listening at: http://localhost:8000/');