Generate dist on directory up to simplify test and production
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Peter Stuifzand 2019-08-25 12:46:48 +02:00
parent 9186115066
commit 2afde26606
4 changed files with 4 additions and 3 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ wiki
data/ data/
session/ session/
editor/node_modules/* editor/node_modules/*
dist/

View File

@ -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"]

View File

@ -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: {

View File

@ -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{})