Skip to content
neko_code edited this page Jul 21, 2018 · 6 revisions

Loading the web framework

The whole framework is just a plugin for Neko Framework. It can be loaded by adding this framework to the list of plugins to load, nothing more to do!

Neko Framework (source code and build) is available in my repository here. It's a small set of different utilities and tools (only Lua as external library, nothing else).

Setting up the web framework

serversettings.json It's the main server settings file which looks like this:

{

    "shared" : {
	    "threadMaxCount" : 64,                       // maximum threads count, if 0 system available # of cpus will be used
	    "maxMemoryUsage" : 0
    },

    // the list of server applications
    "applications" :  [ 
	    {
		    "application" :  {
			    "name": "127.0.0.1",        // the address or domain of application
			    "rootDirectory" : "/Users/neko/Desktop/servertest/www/",
			    "tempDirectory" : "",       // if empty, system default will be used
			    "module" : "myApplication", // name/path of the module file
			    "moduleUpdate" : ""
		    },
		    "server" : {
			    "port" : 8080,              // ports, if both are set then two listeners will be created
			    "tlsPort" : 8443,
			    "requestMaxSize" : 10485760
		    },
		    "ssl" : {
			    "certFile" : "cert.pem",
			    "keyFile" : ""
		    }
	    }
    ]
}

Settings file is only loaded on Skylar server initialization.

Clone this wiki locally