UNPKG

strife

Version:

Full readme coming soon.

94 lines (83 loc) 1.89 kB
#!/usr/bin/env node var port = process.argv[2]; if(!port){ if(/^win/.test(process.platform)){ port = 80; } else{ port = 8080; } } var ws = require('web-servo'); ws.config({ "server": { "port": port, "dir": "/", "exitOnError": false, "ssl": { "enabled": false, "key": "", "cert": "" } }, "page": { "script": "node.js", "default": "index.html", "error": { // "401": "401.html", // "403": "403.html", // "404": "404.html", // "500": "500.html" } }, "url": { // "/not-here.html": { // "alias": "test.html" // }, // "/alias-recursion-1.html": { // "alias": "alias-recursion-2.html" // }, // "/alias-recursion-2.html": { // "alias": "alias-recursion-1.html" // }, // "/first/*": { // "alias": "/second/*" // } }, "methods": { "allowed": [ "OPTIONS", "GET", "POST", "HEAD", "PUT", "PATCH", "DELETE" //"COPY", //"LINK", //"UNLINK", //"TRACE", //"CONNECT" ] }, "log": { "access": { "enabled": true, "path": "log/access.log", "console": true }, "error": { "enabled": true, "path": "log/error.log", "console": true, "debug": true }, "warning": { "enabled": true } } }); //ws.setConfigVar('server.port', port); ws.silent().start(); console.log("-----------------------------------------------------"); console.log("Hit CTRL-C to stop the server...");