This example add-on uses files from Stremio Static Add-on Example
npm install
npm start
Then use the URL that is printed as the Add-on Repository URL
index.js file contents:
const express = require('express')
const app = express()
const opts = {
setHeaders: (res, path, stat) => {
res.set('Access-Control-Allow-Origin', '*')
res.set('Access-Control-Allow-Headers', '*')
}
}
app.use('/', express.static('./', opts))
app.listen(7000)
console.log('Add-on started on: http://127.0.0.1:7000/manifest.json')That's it, this add-on simply serves the files from Stremio Static Add-on Example through a local web server, it also sets CORS in the response headers.
localtunnel allows you to publish a local add-on to a remote address.
Usage:
npm install -g localtunnel
lt --port 7000
This will typically bring a response such as:
your url is: https://perfect-bird-96.localtunnel.me
In which case you should use https://perfect-bird-96.localtunnel.me/manifest.json as your Add-on Repository URL
