Generate dist on directory up to simplify test and production
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
9186115066
commit
2afde26606
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -3,3 +3,4 @@ wiki
|
||||||
data/
|
data/
|
||||||
session/
|
session/
|
||||||
editor/node_modules/*
|
editor/node_modules/*
|
||||||
|
dist/
|
||||||
|
|
|
@ -5,5 +5,5 @@ EXPOSE 80
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ADD ./wiki /app
|
ADD ./wiki /app
|
||||||
ADD ./templates /app/templates
|
ADD ./templates /app/templates
|
||||||
ADD ./editor/dist /app/public
|
ADD ./dist /app/dist
|
||||||
ENTRYPOINT ["/app/wiki"]
|
ENTRYPOINT ["/app/wiki"]
|
||||||
|
|
|
@ -10,7 +10,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
filename: '[name].bundle.js',
|
filename: '[name].bundle.js',
|
||||||
path: path.resolve(__dirname, 'dist')
|
path: path.resolve(__dirname, '../dist')
|
||||||
},
|
},
|
||||||
|
|
||||||
module: {
|
module: {
|
||||||
|
|
2
main.go
2
main.go
|
@ -549,7 +549,7 @@ func main() {
|
||||||
response.Meta.Title = "Test"
|
response.Meta.Title = "Test"
|
||||||
json.NewEncoder(w).Encode(response)
|
json.NewEncoder(w).Encode(response)
|
||||||
})
|
})
|
||||||
http.Handle("/public/", http.StripPrefix("/public/", http.FileServer(http.Dir("/home/peter/work/editorjs/dist/"))))
|
http.Handle("/public/", http.StripPrefix("/public/", http.FileServer(http.Dir("./dist"))))
|
||||||
http.Handle("/save/", &saveHandler{})
|
http.Handle("/save/", &saveHandler{})
|
||||||
http.Handle("/edit/", &editHandler{})
|
http.Handle("/edit/", &editHandler{})
|
||||||
http.Handle("/history/", &historyHandler{})
|
http.Handle("/history/", &historyHandler{})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user