const path = require('path');
const fs = require('fs');
const express = require('express');
const http = require('http');
const bracks_parser = require('../bracks-parser.js');
const app = express();
var server = http.createServer(app);

server.listen(3000, function() {
  console.log('test server listening at port 3000..');
});

app.set('views', path.join(process.cwd(), 'views'));
app.set('view engine', 'ejs');

app.use(bracks_parser('./bracks'));

app.get('/testhtml', function(req, res, next) {
  fs.createReadStream('./views/index-html.html'), 'utf8')
    .pipe(res);
});

app.get('/testejs', function(req, res, next) {
  fs.createReadStream('./views/index-ejs.ejs'), 'utf8')
    .pipe(res);
});

@@ -511,33 +511,59 @@
 eReadStream(
-'./
+path.join(process.cwd(), '
 views
-/
+', '
 index-html.h
@@ -568,37 +568,32 @@
 .html'), 'utf8')
-%0A    
 .pipe(res);%0A%7D);%0A
@@ -666,17 +666,43 @@
 eam(
-'./
+path.join(process.cwd(), '
 views
-/
+', '
 inde
@@ -725,13 +725,8 @@
 f8')
-%0A    
 .pip

update test server