Add start server plesk script
All checks were successful
Production deployment / Production-Deployment (push) Successful in 44s
All checks were successful
Production deployment / Production-Deployment (push) Successful in 44s
This commit is contained in:
15
next-start.js
Normal file
15
next-start.js
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/opt/plesk/node/18/bin/node
|
||||
process.env.NODE_ENV = 'production';
|
||||
const { createServer } = require('http');
|
||||
const next = require('next');
|
||||
|
||||
const app = next({ dev: false });
|
||||
const handler = app.getRequestHandler();
|
||||
const port = process.env.PORT || 3000;
|
||||
|
||||
app.prepare().then(() => {
|
||||
createServer(handler).listen(port, (err) => {
|
||||
if (err) throw err;
|
||||
console.log(`> Ready on http://localhost:${port}`);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user