mirror of
https://github.com/KevinMidboe/leifsopplevelser.git
synced 2025-10-28 17:20:21 +00:00
Source and server for serving built files.
This commit is contained in:
23
server.js
Normal file
23
server.js
Normal file
@@ -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);
|
||||||
29
src/App.vue
Normal file
29
src/App.vue
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<template>
|
||||||
|
<div id="app" class="container">
|
||||||
|
<home></home>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Vue from 'vue'
|
||||||
|
import Home from '@/components/Home.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'App',
|
||||||
|
components: {
|
||||||
|
Home
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loaded: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
@import './scss/main.scss';
|
||||||
|
</style>
|
||||||
39
src/components/Home.vue
Normal file
39
src/components/Home.vue
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
<template>
|
||||||
|
<div class="col-md-10 col-sm-12">
|
||||||
|
<h1>Leifs opplevelser</h1>
|
||||||
|
<h2>Han har ikke hatt nok etter 60 år!</h2>
|
||||||
|
{{ date }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// import '' from ''
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: 'Leifs opplevelser',
|
||||||
|
date: undefined,
|
||||||
|
bool: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.date = new Date();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style language="scss">
|
||||||
|
h1 {
|
||||||
|
font-size: 6rem;
|
||||||
|
font-weight: 400;
|
||||||
|
font-style: normal;
|
||||||
|
text-align: center;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
text-align: center;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
12
src/index.html
Normal file
12
src/index.html
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
|
<title>Leifsopplevelser</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="app"></div>
|
||||||
|
<!-- built files will be auto injected -->
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
17
src/main.js
Normal file
17
src/main.js
Normal file
@@ -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: '<App/>'
|
||||||
|
})
|
||||||
|
|
||||||
18
src/scss/main.scss
Normal file
18
src/scss/main.scss
Normal file
@@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
10
src/scss/typography.scss
Normal file
10
src/scss/typography.scss
Normal file
@@ -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;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user