![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | build/ | 2 years ago | - | |
![]() | config/ | 2 years ago | - | |
![]() | database/ | 2 years ago | - | |
![]() | node_modules/ | 2 years ago | - | |
![]() | public/ | 2 years ago | - | |
![]() | src/ | a year ago | - | |
![]() | README.md | 2 years ago | 2.8K | d7c1522 post receive test [كارل مبارك] |
![]() | USAGE.md | 2 years ago | 14K | |
![]() | api.apache.example.conf | 2 years ago | 2.0K | |
![]() | favicon.ico | 2 years ago | 3.6K | |
![]() | package-lock.json | 2 years ago | 604K | 9cdca9a added node version as npm module [كارل مبارك] |
![]() | package.json | 2 years ago | 965 | 9cdca9a added node version as npm module [كارل مبارك] |
Configure your .env file based on this example.
cd back
nano .env
Then you can install the required libraries ( ~ 700MB ) and build the admin UI.
npm i
npm run build
In a development environment, start Strapi with autoReload enabled.
npm run develop
In a production environment, start Strapi with autoReload disabled.
npm run start
Strapi will start on the port configured in the .env file. If any errors occur with initializing mux or mollie clients, it will throw an error and exit.
At this point, you should set up a dedicated domain / subdomain for Strapi ( separate from the Vue SPA ) in your DNS manager and point it to your server's IP address.
Next, configure a site in your apache or nginx webserver for this domain and set it up to proxy connections to the port where Strapi is running.
Note: Strapi will also be running a socket.io server instance to relay messages, livestream updates and emojis to connected viewers. Please make sure to configure your apache / nginx configuration file to handle these connections.
Please refer to the apache configuration example.
The example given assumes that you can generate a self-signged SSL certificate on your server, as this is recccommended for Strapi to work across origins!
You can head over to https://{ your-strapi-host }/admin
and create your admin users / other users.
To keep the application running on the server, you need a node proccess manager / daemonizer. I am using [pm2](https://pm2.keymetrics.io/)
for this:
cd back
pm2 start "npm run start" --name "API.LIVE"
Viewing logs:
pm2 logs API.LIVE
Stopping:
pm2 stop API.LIVE
Restarting
pm2 restart API.LIVE
Last, head over to your mux dashboard and set up a webhook in your settings that points to the following URL scheme:
https://{ your-strapi-host }/api/mux-hook
This webhook will inform Strapi of all its video and livestream API events, and Strapi in turn informs connected clients of these events. Make sure you pick the appropriate environment.
We are using the sqlite
database with strapi so backing up is quite straight forward. On your development server, just copy the entire back
folder somewhere safe before making any breaking changes to it. This will copy the configurations, database and uploads.
In case you are using git to version manage your strapi config, you can always just copy the following files/folders:
back/.tmp/data.db
: the entire sqlite databaseback/public/uploads
: all the files uploaded through strapi