���� JFIF �� � ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /proc/self/root/lib/node_modules/forever/node_modules/flatiron/examples/ |
var util = require('util'), flatiron = require('../lib/flatiron'), app = flatiron.app; app.use(flatiron.plugins.http); app.router.get('/', function () { this.res.writeHead(200, { 'Content-Type': 'text/plain' }); this.res.end('Hello world!\n'); }); app.router.post('/', function () { this.res.writeHead(200, { 'Content-Type': 'text/plain' }); this.res.write('Hey, you posted some cool data!\n'); this.res.end(util.inspect(this.req.body, true, 2, true) + '\n'); }); app.router.get('/sandwich/:type', function (type) { if (~['bacon', 'burger'].indexOf(type)) { this.res.writeHead(200, { 'Content-Type': 'text/plain' }); this.res.end('Serving ' + type + ' sandwich!\n'); } else { this.res.writeHead(404, { 'Content-Type': 'text/plain' }); this.res.end('No such sandwich, sorry!\n'); } }); app.start(8080);