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 --ts
or any other starting method). I will usenpm
. - Upload all your project files to the hosting. Put them in
domain/public_nodejs
. Excludenode_modules
and.next
, so that it uploads faster (you can also make use of git repo). Enter the directory. - Create
app.js
file with the following content:
const nextStart = require("next/dist/cli/next-start");
nextStart.nextStart([]);
- Run
npm ci
to install all dependencies. - Run
npm run build
to 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