Microservice for portalen content.
Retrieves content from different services based on your roles.
Returns content for roles
$ curl https://content.portalen.win/api/content?roles=alle|administrasjonen|skole
Returns content for roles
$ curl -d '{"roles": ["alle", "administrasjonen", "skole"]}' https://content.portalen.win/api/content
The roles will be mapped to tags and then service will collect posts from different WP-instances based om those tags.
The results will be sorted by date, cached based on the combination of tags and returned to the user.
Add a local .env
file
NODE_ENV=development
CONTENT_URL=url-to-content
SHARED_CONTENT_URL=url-to-shared-content
PAPERTRAIL_HOST=papertrail-host
PAPERTRAIL_PORT=papertrail-port
PAPERTRAIL_HOSTNAME=portalen
Make sure all secrets required by now.json is available for the instance.
Run the deploy script.
$ npm run deploy