Open academici opened 5 years ago
Nginx Unit from the version 1.5 supports nodejs applications (http://unit.nginx.org/configuration/#go-node-js-applications)
To start, you need to write a script like
#!/usr/bin/env node const { createServer, IncomingMessage, ServerResponse, } = require('unit-http') require('http').ServerResponse = ServerResponse require('http').IncomingMessage = IncomingMessage const express = require('express') const app = express() app.get('/', (req, res) => { res.set('X-Unit-Type', 'Absolute') res.send('Hello, Unit!') }) createServer(app).listen()
and integrate with uvue server adapters https://universal-vue.github.io/docs/guide/server.html#adapters
...combined with this configuration...
{ "listeners": { "*:8080": { "application": "hello-unit" } }, "applications": { "hello-unit": { "type": "external", "working_directory": "/path/to/project", "executable": "app.js" } } }
Nginx Unit from the version 1.5 supports nodejs applications (http://unit.nginx.org/configuration/#go-node-js-applications)
To start, you need to write a script like
and integrate with uvue server adapters https://universal-vue.github.io/docs/guide/server.html#adapters
...combined with this configuration...