Web framework.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

12345678910111213141516
  1. #!/usr/bin/env node
  2. if (process.argv[2] === "-h" || process.argv[2] === "--help") {
  3. console.log("Usage: webframe [directory]");
  4. console.log(" Create a web server in directory [dir] (or in the current directory).")
  5. console.log(" Set the port (default 8080) with the PORT environment variable.");
  6. console.log(" Set the host (default 127.0.0.1) with the HOSTNAME environment variable.");
  7. process.exit(1);
  8. }
  9. var webframe = require(".");
  10. var dir = process.argv[2] || ".";
  11. var app = new webframe.App();
  12. app.get("^.*", webframe.static(dir));