ABAP,Java, nodejs和go语言的web server编程

ABAP and Java

see my blog).

nodejs

用nodejs现成的express module,几行代码就能写个server出来:


var express = require('express');

var routesEngine = require('./jerryapp/routes/index.js'); // index.js actually

http://www.ruanyifeng.com/blog/2015/05/require.html

var app = express();

app.use('/ui5', express.static(process.cwd() + '/webapp'));

app.use('/v', express.static(process.cwd() + '/vue'));

app.use('/map', express.static(process.cwd() + '/map'));

app.use('/tile', express.static(process.cwd() + '/tileStudy'));

app.use('/a2', express.static(process.cwd() + '/a2'));

routesEngine(app);

app.listen(process.env.PORT || 3000, function () {

console.log('Listening on port, process.cwd(): ' + process.cwd() );

});

go

ABAP,Java, nodejs和go语言的web server编程

ABAP,Java, nodejs和go语言的web server编程

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

ABAP,Java, nodejs和go语言的web server编程

上一篇:NodeJs——(1)封装,调用,执行,访问路径,http,函数编程,等待函数,事件监听


下一篇:基于smart-retry源码改造升级