--- /dev/null
+{
+ "name": "tavern",
+ "version": "1.0.0",
+ "description": "Utility to organize your tavern.",
+ "main": "tavern.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "hackbard@hackdaworld.org:/chroot/git/outofuni/tavern.git"
+ },
+ "author": "hackbard@hackdaworld.org",
+ "license": "Apache-2.0"
+}
--- /dev/null
+/*
+ * ./tavern.js - main (of the) tavern server code
+ * the NE of the NEAN stack
+ * ax
+ * np
+ * or
+ * e
+ * s
+ * s
+ *
+ * author: hackbard@hackdaworld.org
+ *
+ */
+
+var express=require('express');
+var nano=require('nano');
+
+// the server app
+var tavern=express();
+
+// serve client code
+tavern.set('views',path.join(__dirname,'views'));
+tavern.set('view engine','ejs');
+tavern.use(express.static(path.join(__dirname,'public')));
+
+// routes
+tavern.get('/',function(req,res) {
+ res.send("Application 'tavern' is up and running ...");
+});
+
+tavern.get('/tables',function(req,res) {
+ res.send("Tables ...");
+});
+
+tavern.get('/orders',function(req,res) {
+ res.send("Orders ...");
+});
+
+tavern.get('/products',function(req,res) {
+ res.send("Products ...");
+});
+
+// start server listening on 1337
+tavern.listen(1337,function() {
+ console.log("Application 'tavern' listening on port 1337 ...");
+});
+