From 7d0293a818bee9072c318f635e64e108a3784529 Mon Sep 17 00:00:00 2001 From: KevinMidboe Date: Mon, 7 Jan 2019 23:15:36 +0100 Subject: [PATCH] Source and server for serving built files. --- server.js | 23 +++++++++++++++++++++++ src/App.vue | 29 +++++++++++++++++++++++++++++ src/components/Home.vue | 39 +++++++++++++++++++++++++++++++++++++++ src/index.html | 12 ++++++++++++ src/main.js | 17 +++++++++++++++++ src/scss/main.scss | 18 ++++++++++++++++++ src/scss/typography.scss | 10 ++++++++++ 7 files changed, 148 insertions(+) create mode 100644 server.js create mode 100644 src/App.vue create mode 100644 src/components/Home.vue create mode 100644 src/index.html create mode 100644 src/main.js create mode 100644 src/scss/main.scss create mode 100644 src/scss/typography.scss diff --git a/server.js b/server.js new file mode 100644 index 0000000..5420f82 --- /dev/null +++ b/server.js @@ -0,0 +1,23 @@ +var express = require('express'); +var path = require('path'); +var history = require('connect-history-api-fallback'); +var compression = require('compression') + +app = express(); + +app.use(compression()); +app.use('/static', express.static(path.join(__dirname + "/dist/static"))); +app.use('/favicons', express.static(path.join(__dirname + "/favicons"))); +app.use(history({ + index: '/' +})); + +var port = process.env.PORT || 5000; + +app.get('/', function(req, res) { + res.sendFile(path.join(__dirname + '/dist/index.html')); +}); + +console.log('Serving webpage on port:', port) + +app.listen(port); diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..7a6e6dd --- /dev/null +++ b/src/App.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/src/components/Home.vue b/src/components/Home.vue new file mode 100644 index 0000000..1e9f1cc --- /dev/null +++ b/src/components/Home.vue @@ -0,0 +1,39 @@ + + + + + \ No newline at end of file diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..5183fdb --- /dev/null +++ b/src/index.html @@ -0,0 +1,12 @@ + + + + + + Leifsopplevelser + + +
+ + + diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..beb086b --- /dev/null +++ b/src/main.js @@ -0,0 +1,17 @@ +// The Vue build version to load with the `import` command +// (runtime-only or standalone) has been set in webpack.base.conf with an alias. +import Vue from 'vue' +import App from './App' +import axios from 'axios' +import BootstrapVue from 'Bootstrap-vue' + +Vue.config.productionTip = false + +new Vue({ + el: '#app', + axios, + BootstrapVue, + components: { App }, + template: '' +}) + diff --git a/src/scss/main.scss b/src/scss/main.scss new file mode 100644 index 0000000..1047a98 --- /dev/null +++ b/src/scss/main.scss @@ -0,0 +1,18 @@ +@import './typography.scss'; +// @import 'bootstrap/dist/css/bootstrap.css'; +// @import 'bootstrap-vue/dist/bootstrap-vue.css'; + +html, body { + margin: 0px; + padding: 0px; + line-height: 1; +} + +#app { + color: black; + font-weight: 400; +} + + + + diff --git a/src/scss/typography.scss b/src/scss/typography.scss new file mode 100644 index 0000000..3c1af08 --- /dev/null +++ b/src/scss/typography.scss @@ -0,0 +1,10 @@ +@import url('https://fonts.googleapis.com/css?family=Noto+Sans+JP'); + +html { + font-family: 'Noto Sans JP', sans-serif; +} + +h1, h2, h3, h4, h5, p { + font-weight: normal; + font-style: normal; +} \ No newline at end of file