main.js 381 B

123456789
  1. var http = require('http');
  2. // Instantiate a JTalk object to process requests
  3. var server = smalltalk.TrivialServer._new();
  4. http.createServer(function (req, res) {
  5. res.writeHead(200, {'Content-Type': 'text/html'});
  6. // Let the JTalk object process it
  7. res.end(server._process_(req));
  8. }).listen(1337, "127.0.0.1");
  9. console.log('TrivialServer running at http://127.0.0.1:1337/');