Skip to content

Commit 3f80da8

Browse files
committed
add base image
1 parent 979648b commit 3f80da8

27 files changed

+8985
-1
lines changed

Diff for: .browserslistrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
> 1%
2+
last 2 versions

Diff for: .editorconfig

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[*.{js,jsx,ts,tsx,vue}]
2+
indent_style = space
3+
indent_size = 2
4+
end_of_line = lf
5+
trim_trailing_whitespace = true
6+
insert_final_newline = true
7+
max_line_length = 100

Diff for: .eslintrc.js

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true,
5+
},
6+
extends: [
7+
'plugin:vue/essential',
8+
'@vue/airbnb',
9+
],
10+
rules: {
11+
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
12+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
13+
'import/extensions': 'off'
14+
},
15+
parserOptions: {
16+
parser: 'babel-eslint',
17+
},
18+
};

Diff for: .gitignore

+70-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,81 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (https://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# TypeScript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# dotenv environment variables file
58+
.env
59+
60+
# next.js build output
61+
.next
62+
63+
### Go
164
# Binaries for programs and plugins
265
*.exe
366
*.exe~
467
*.dll
568
*.so
669
*.dylib
770

8-
# Test binary, build with `go test -c`
71+
# Test binary, built with `go test -c`
972
*.test
1073

1174
# Output of the go coverage tool, specifically when used with LiteIDE
1275
*.out
76+
77+
# Dependency directories (remove the comment below to include it)
78+
# vendor/
79+
80+
# vue build
81+
dist/

Diff for: LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Gordon Zhong
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Diff for: babel.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
presets: [
3+
'@vue/app',
4+
],
5+
};

Diff for: docker-compose.yml

Whitespace-only changes.

Diff for: package.json

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "27-1hoursite",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"serve": "vue-cli-service serve",
7+
"build": "vue-cli-service build",
8+
"lint": "vue-cli-service lint"
9+
},
10+
"dependencies": {
11+
"core-js": "^2.6.5",
12+
"vue": "^2.6.10",
13+
"vue-router": "^3.0.3",
14+
"vuetify": "^2.0.0"
15+
},
16+
"devDependencies": {
17+
"@vue/cli-plugin-babel": "^3.11.0",
18+
"@vue/cli-plugin-eslint": "^3.11.0",
19+
"@vue/cli-service": "^3.11.0",
20+
"@vue/eslint-config-airbnb": "^4.0.0",
21+
"babel-eslint": "^10.0.1",
22+
"eslint": "^5.16.0",
23+
"eslint-plugin-vue": "^5.0.0",
24+
"sass": "^1.17.4",
25+
"sass-loader": "^7.1.0",
26+
"vue-cli-plugin-vuetify": "^0.6.3",
27+
"vue-template-compiler": "^2.6.10",
28+
"vuetify-loader": "^1.2.2"
29+
}
30+
}

Diff for: postcss.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
plugins: {
3+
autoprefixer: {},
4+
},
5+
};

Diff for: public/favicon.ico

1.12 KB
Binary file not shown.

Diff for: public/index.html

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7+
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
8+
<title>Almanac</title>
9+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900">
10+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css">
11+
</head>
12+
<body>
13+
<noscript>
14+
<strong>Sorry, this site needs JavaScript to be enabled to be shown.</strong>
15+
</noscript>
16+
<div id="app"></div>
17+
<!-- built files will be auto injected -->
18+
</body>
19+
</html>

Diff for: server/go.mod

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module csesoc.unsw.edu.au/m/v2
2+
3+
go 1.13
4+
5+
require github.com/labstack/echo/v4 v4.1.10 // indirect

Diff for: server/go.sum

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
2+
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
3+
github.com/labstack/echo/v4 v4.1.10 h1:/yhIpO50CBInUbE/nHJtGIyhBv0dJe2cDAYxc3V3uMo=
4+
github.com/labstack/echo/v4 v4.1.10/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g=
5+
github.com/labstack/gommon v0.3.0 h1:JEeO0bvc78PKdyHxloTKiF8BD5iGrH8T6MSeGvSgob0=
6+
github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
7+
github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU=
8+
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
9+
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
10+
github.com/mattn/go-isatty v0.0.9 h1:d5US/mDsogSGW37IV293h//ZFaeajb69h+EHFsv2xGg=
11+
github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=
12+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
13+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
14+
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
15+
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
16+
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
17+
github.com/valyala/fasttemplate v1.0.1 h1:tY9CJiPnMXf1ERmG2EyK7gNUd+c6RKGD0IfU8WdUSz8=
18+
github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
19+
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
20+
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 h1:HuIa8hRrWRSrqYzx1qI49NNxhdi2PrY7gxVSq1JjLDc=
21+
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
22+
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=
23+
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
24+
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
25+
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
26+
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
27+
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
28+
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
29+
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
30+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
31+
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

Diff for: server/server.go

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package main
2+
3+
import (
4+
"net/http"
5+
6+
"github.com/labstack/echo/v4"
7+
)
8+
9+
func main() {
10+
// Create new instance of echo
11+
e := echo.New()
12+
13+
servePages(e)
14+
serveAPI(e)
15+
16+
// Start echo instance on 1323 port
17+
e.Logger.Fatal(e.Start(":1323"))
18+
}
19+
20+
func servePages(e *echo.Echo) {
21+
// Setup our assetHandler and point it to our static build location
22+
assetHandler := http.FileServer(http.Dir("../dist/"))
23+
24+
// Setup a new echo route to load the build as our base path
25+
e.GET("/", echo.WrapHandler(assetHandler))
26+
27+
// Serve our static assists under the /static/ endpoint
28+
e.GET("/js/*", echo.WrapHandler(assetHandler))
29+
e.GET("/css/*", echo.WrapHandler(assetHandler))
30+
31+
echo.NotFoundHandler = func(c echo.Context) error {
32+
// render your 404 page
33+
return c.String(http.StatusNotFound, "not found page")
34+
}
35+
}
36+
37+
func serveAPI(e *echo.Echo) {
38+
// Add more API routes here
39+
e.GET("/api/v1/test", func(c echo.Context) error {
40+
return c.String(http.StatusOK, "Hello, World!")
41+
})
42+
43+
}

Diff for: services/api.Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM golang:1.13-buster

Diff for: services/db.Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM mongo:4.2-bionic

Diff for: services/server.Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM golang:1.13-buster

Diff for: src/App.vue

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<template>
2+
<v-app id="main-app">
3+
<!-- Navigation bar/app bar goes here -->
4+
<v-content>
5+
<router-view></router-view>
6+
</v-content>
7+
</v-app>
8+
</template>
9+
10+
<script>
11+
12+
export default {
13+
name: 'App',
14+
components: {},
15+
data: () => ({}),
16+
};
17+
</script>
18+
19+
<style scoped>
20+
</style>

Diff for: src/assets/logo.png

6.69 KB
Loading

Diff for: src/assets/logo.svg

+1
Loading

Diff for: src/components/HomeGreeting.vue

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<template>
2+
<p>Hi</p>
3+
</template>
4+
5+
<script>
6+
export default {
7+
data: () => ({}),
8+
};
9+
</script>

Diff for: src/main.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import Vue from 'vue';
2+
import App from './App.vue';
3+
import router from './router';
4+
import vuetify from './plugins/vuetify';
5+
6+
Vue.config.productionTip = false;
7+
8+
new Vue({
9+
router,
10+
vuetify,
11+
render: h => h(App),
12+
}).$mount('#app');

Diff for: src/plugins/vuetify.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import Vue from 'vue';
2+
import Vuetify from 'vuetify/lib';
3+
4+
Vue.use(Vuetify);
5+
6+
export default new Vuetify({
7+
icons: {
8+
iconfont: 'mdi',
9+
},
10+
});

Diff for: src/router.js

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import Vue from 'vue';
2+
import Router from 'vue-router';
3+
import Home from './views/Home.vue';
4+
5+
Vue.use(Router);
6+
7+
export default new Router({
8+
routes: [
9+
{
10+
path: '/',
11+
name: 'root',
12+
component: Home,
13+
},
14+
{
15+
path: '/about',
16+
name: 'about',
17+
// route level code-splitting
18+
// this generates a separate chunk (about.[hash].js) for this route
19+
// which is lazy-loaded when the route is visited.
20+
component: () => import('./views/About.vue'),
21+
},
22+
],
23+
});

Diff for: src/views/About.vue

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<template>
2+
<p>This is a sample about page</p>
3+
</template>
4+
5+
<script>
6+
export default {
7+
data: () => ({}),
8+
components: [],
9+
};
10+
</script>
11+
12+
<style scoped>
13+
</style>

Diff for: src/views/Home.vue

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<template>
2+
<div>
3+
<p>This is a sample home view</p>
4+
<HomeGreeting />
5+
</div>
6+
</template>
7+
8+
<script>
9+
import { HomeGreeting } from '../components/HomeGreeting';
10+
11+
export default {
12+
data: () => ({}),
13+
components: [HomeGreeting],
14+
};
15+
</script>
16+
17+
<style scoped>
18+
</style>

0 commit comments

Comments
 (0)