我有一个正在增长的node.js服务器应用程序,我想将它分成几个文件。下面是一个工作代码片段,演示单块server.js的大致样子:
var express = require('express');
var app = express();
// other initialization code etc
//************** start of part to be moved foo.js
var fooTestData = {data: "data", id:1};
app.get("/foo/ajax", functio
我知道您可以构建一个WAR文件来部署到应用服务器,但是在运行主application类时会创建什么样的服务器呢?
/**
* Main method, used to run the application.
*/
public static void main(String[] args) throws UnknownHostException {
SpringApplication app = new SpringApplication(Application.class);
SimpleCommandLinePropertySource source = new Si