Guest User

Untitled

a guest
Jul 16th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. /*
  2. // compressed
  3. Server=require("ringo/httpserver").Server;a=require("stick").Application();a.configure("route");a.get("/",function(){return{status:200,headers:{},body:["hello world"]}});(new Server({app:a})).start();
  4. */
  5.  
  6. // less compressed
  7. var Server = require("ringo/httpserver").Server;
  8. var app = require('stick').Application();
  9. app.configure("route");
  10. app.get('/', function() {
  11. return {
  12. status: 200,
  13. headers: {},
  14. body: ['hello world']};
  15. }
  16. );
  17. server = new Server({port: '8080', app: app});
  18. server.start();
Add Comment
Please, Sign In to add comment