simple-pwa

0.0.0 • Public • Published

📦 Simple PWA

Example

import createPWA from 'simple-pwa';
import express from 'express';

const pwa = await createPWA({
    // Creates an importmap. Set to 'bundle' to bundle into one file.
    method: 'importmap',

    // Entrypoint to be loaded
    entrypoint: 'ui/index.mjs',

    // Directories to serve
    staticDirs: ['assets'],

    // Base path. Defaults to CWD.
    basePath: pathToFileURL(process.cwd() + '/'),

    // Title of the Page
    title: 'My super PWA',

    // Charset. Defaults to 'utf-8'
    charset = 'utf-8',
});

const app = express();
app.use(pwa);
app.listen(8080);

Readme

Keywords

Package Sidebar

Install

npm i simple-pwa

Weekly Downloads

1

Version

0.0.0

License

MIT

Unpacked Size

5.32 kB

Total Files

4

Last publish

Collaborators

  • jue89