General
Quite possibly this will work on any other hosting provider that allows running Nodejs applications by executing a single file.
Setup
- Prepare your application (use
npx create-next-app dir --use-npm --tsor any other starting method). I will usenpm. - Upload all your project files to the hosting. Put them in
domain/public_nodejs. Excludenode_modulesand.next, so that it uploads faster (you can also make use of git repo). Enter the directory. - Create
app.jsfile with the following content:
const nextStart = require("next/dist/cli/next-start");
nextStart.nextStart([]);
- Run
npm cito install all dependencies. - Run
npm run buildto prepare production release of your application. - (optional) Restart the application:
devil www restart domain-name.
Integration with git
TODO: https://wiki.mydevil.net/Git
- dependency install must be configured
- next run build must be configured