Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sample
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周韬
node-sample
Commits
b2231967
Commit
b2231967
authored
Mar 17, 2017
by
Evan You
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enable caching on static assets (close #150)
parent
040e0d35
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
server.js
server.js
+3
-3
No files found.
server.js
View file @
b2231967
...
...
@@ -47,9 +47,9 @@ const serve = (path, cache) => express.static(resolve(path), {
app
.
use
(
compression
({
threshold
:
0
}))
app
.
use
(
favicon
(
'./public/logo-48.png'
))
app
.
use
(
'/dist'
,
serve
(
'./dist'
))
app
.
use
(
'/public'
,
serve
(
'./public'
))
app
.
use
(
'/manifest.json'
,
serve
(
'./manifest.json'
))
app
.
use
(
'/dist'
,
serve
(
'./dist'
,
true
))
app
.
use
(
'/public'
,
serve
(
'./public'
,
true
))
app
.
use
(
'/manifest.json'
,
serve
(
'./manifest.json'
,
true
))
app
.
use
(
'/service-worker.js'
,
serve
(
'./dist/service-worker.js'
))
app
.
get
(
'*'
,
(
req
,
res
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment