@rproenza/rrp-services-prpl

2.1.5 • Public • Published

@rproenza/rrp-services-prpl

Serve different versions of your prpl app application to different browsers by detecting browser capabilities using the user-agent header.

Special focus in Progressive Web Apps and Polymer Web Apps.

Serve PRPL apps in production.

ExpressJS + TypeScript Node Server

Build Status Codacy Badge Codacy Badge Dependency Status Greenkeeper badge semantic-release npm (scoped) npm license

Usage as a library

const server = require('@rproenza/rrp-services-prpl')

const port = 8787;
const builsPath = "./src/public/";
const buildsConfig = [
        {name: "es6-unbundled", browserCapabilities: ["es2015", "push"]},
        {name: "es6-bundled"},
    ];

server.startServer(port, builsPath, buildsConfig);

// output : App is running at http://localhost:8787 in development mode

Usage as a server

Getting started

  • Clone the repository
git clone --depth=1 https://github.com/rproenza86/rrp-services-prpl.git <project_name>
  • Install dependencies
cd <project_name>
npm install
  • Copy your builds directory to src/public/
cp -R /build/source src/public/ 
  • Update the directory names and others options in the builds array param of the function prpl.makeHandler:
server.ts file
line 89
  • Build and run the project
npm start

Navigate to http://localhost:3000

Project Structure

Check the README_EXPANDED.md file .

Package Sidebar

Install

npm i @rproenza/rrp-services-prpl

Weekly Downloads

1

Version

2.1.5

License

GPL-3.0

Last publish

Collaborators

  • rproenza