Pack your own flarum instance
About nwjs
nwjs is a web development kit for many people. It can help them to pack a web app into a single desktop app so you can pack your flarum instance into it.
Here are the steps:
- 1. download the nwjs kit https://nwjs.io
- 2. Unpack it by using
tar -xf /path/to/the/package
- 3. create a file named "package.json" and insert:
{
"main": "index.html",
"name": "app"
}
- 4. create index.html:
<!doctype html>
<html>
<head>
<title>Please wait...</title>
</head>
<body>
<h1>Please keep your computer on internet.</h1>
<p>redirect...</p>
</body>
<script>
window.location.href = '<your instance url>'
</script>
</html>
- 5. launch your app!
How to make your app installer
Simple. Download inno setup from https://jrsoftware.org/isdl.php and follow the script wizard in it.
How to make it public
If you have trouble choosing the ftp server, you can make a free one with divio cloud platform
Steps to make a ftp and upload
- 1. make sure docker and python pip is ready to use
- 2. register an account
- 3. create a new project using blank/nginx
- 4. use
divio login
in your local terminal and paste your account's token
- 5.
divio project setup (your-project-name)
- 6. cd into your workspace folder and into the "html" folder
- 7. copy your installer into this folder
- 8. commit and push the repository
- 9. click 'deploy' in your browser project page
- 10. try to visit <your-project-name>.us.aldryn.io/<installer-file-name> . If success to download, you will able to download the files from other devices.