mirror of
https://github.com/kevin-DL/sapper-template.git
synced 2026-01-14 03:04:40 +00:00
Merge pull request #64 from lukeed/swap/sirv
Replace `serve-static` with `sirv`
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
import sirv from 'sirv';
|
||||
import polka from 'polka';
|
||||
import compression from 'compression';
|
||||
import sapper from 'sapper';
|
||||
import serve from 'serve-static';
|
||||
import compression from 'compression';
|
||||
import { routes } from './manifest/server.js';
|
||||
import App from './App.html';
|
||||
|
||||
polka() // You can also use Express
|
||||
.use(
|
||||
compression({ threshold: 0 }),
|
||||
serve('assets'),
|
||||
sapper({
|
||||
routes,
|
||||
App
|
||||
})
|
||||
sirv('assets'),
|
||||
sapper({ routes, App })
|
||||
)
|
||||
.listen(process.env.PORT);
|
||||
.listen(process.env.PORT)
|
||||
.catch(err => {
|
||||
console.log('error', err);
|
||||
})
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"compression": "^1.7.1",
|
||||
"polka": "^0.3.4",
|
||||
"sapper": "^0.12.0",
|
||||
"serve-static": "^1.13.1"
|
||||
"sirv": "^0.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"npm-run-all": "^4.1.2",
|
||||
|
||||
Reference in New Issue
Block a user