pwa.js 444 Bytes
const path = require('path');

module.exports = {
    sw(req, res) {
        res.set({
            'Cache-Control': 'no-cache',
            Pragma: 'no-cache',
            Expires: (new Date(1900, 0, 1, 0, 0, 0, 0)).toUTCString()
        });

        res.sendFile(path.join(__dirname, '../../../public/static/sw.js'));
    },
    manifest(req, res) {
        res.sendFile(path.join(__dirname, '../../../public/static/manifest.json'));
    }
};