Example movie micro-app using ONEm Framework.
-
Verify you have Node and NPM installed (Node version greater than 9.0.0 is recommended)
-
Sign up for a free api key at https://www.themoviedb.org/account/signup
-
Sign up for a free ONEm developer account at https://developer-portal.onem.zone/
Optional:
- To run locally, install ngrok from https://ngrok.com/
$ npm install
- Create a
.env
file in the project root path:
PORT=3000
READ_ACCESS_TOKEN=<themoviedb API Read Access Token (v4 auth)>
TOKEN_SECRET=<any random string>
- If you're running locally, then use ngrok to give you a publicly accessible url to your Micro-app at
localhost:3000
$ ngrok http 3000
Make a note of the link, eg https://6f1ca7d4.ngrok.io
- In the ONEm Developer Portal, select "Create App" and set:
- callback path to your app
<basepath>/api
, eg:https://6f1ca7d4.ngrok.io/api
- token secret to the value of TOKEN_SECRET from
.env
- In the ONEm Developer Portal, select your new app and then select
Web channel
. Copy/paste the code into thebody
section of the/public/index.html
of your Micro-app
$ node index
In your browser, visit localhost:3000
(or where ever your app is configured to listen)
The ONEm Micro-app should be visible in bottom right-hand corner. Click the icon to open.
More details at https://developer-docs.onem.zone