Compare commits
2 commits
master
...
feature/vu
Author | SHA1 | Date | |
---|---|---|---|
a3fc829555 | |||
5e7868c8e8 |
40 changed files with 8198 additions and 77 deletions
|
@ -1,4 +1,4 @@
|
||||||
FROM node:latest
|
FROM node:latest as devStage
|
||||||
|
|
||||||
# some dir for our code
|
# some dir for our code
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
@ -9,8 +9,5 @@ EXPOSE 3000
|
||||||
COPY package*.json .
|
COPY package*.json .
|
||||||
RUN yarn
|
RUN yarn
|
||||||
|
|
||||||
# copy code
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
# this is how we start
|
# this is how we start
|
||||||
CMD ["yarn", "start"]
|
CMD ["yarn", "watch"]
|
|
@ -10,7 +10,7 @@ fftcgdb = new FFTCGDB path.resolve(__dirname, '../fftcg.db')
|
||||||
|
|
||||||
# create router
|
# create router
|
||||||
FFTCGROUTER = express.Router()
|
FFTCGROUTER = express.Router()
|
||||||
FFTCGROUTER.use express.static path.resolve(__dirname, '../public_html')
|
# FFTCGROUTER.use express.static path.resolve(__dirname, '../public_html')
|
||||||
|
|
||||||
# register user
|
# register user
|
||||||
FFTCGROUTER.post '/register', (req, res) ->
|
FFTCGROUTER.post '/register', (req, res) ->
|
34
backend/package.json
Normal file
34
backend/package.json
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
"name": "yvk-fftcg-backend",
|
||||||
|
"version": "0.1.0",
|
||||||
|
|
||||||
|
"description": "FFTCG online using Socket.IO and CraftyJS on Node.js on Docker",
|
||||||
|
"author": "JMM <jmm@yavook.de>",
|
||||||
|
|
||||||
|
"main": "server.coffee",
|
||||||
|
"private": true,
|
||||||
|
"license": "UNLICENSED",
|
||||||
|
|
||||||
|
"scripts": {
|
||||||
|
"start": "coffee server.coffee",
|
||||||
|
"watch": "nodemon server.coffee",
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
|
||||||
|
"dependencies": {
|
||||||
|
"bcrypt": "^3.0.2",
|
||||||
|
"body-parser": "^1.18.3",
|
||||||
|
"coffeescript": "^2.3.2",
|
||||||
|
"connect-redis": "^3.4.0",
|
||||||
|
"express": "^4.16.4",
|
||||||
|
"express-session": "^1.15.6",
|
||||||
|
"express-socket.io-session": "^1.3.5",
|
||||||
|
"helmet": "^3.15.0",
|
||||||
|
"socket.io": "^2.2.0",
|
||||||
|
"sqlite3": "^4.0.4"
|
||||||
|
},
|
||||||
|
|
||||||
|
"devDependencies": {
|
||||||
|
"nodemon": "^1.18.9"
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,20 +1,18 @@
|
||||||
version: "2"
|
version: "2"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
fftcg:
|
|
||||||
build: .
|
|
||||||
command: "yarn debug"
|
|
||||||
restart: "no"
|
|
||||||
volumes:
|
|
||||||
- "${PWD}/src:/app/src"
|
|
||||||
- "${PWD}/views:/app/views:ro"
|
|
||||||
- "${PWD}/public_html:/app/public_html"
|
|
||||||
- "${PWD}/inc:/app/inc:ro"
|
|
||||||
- "${PWD}/server.coffee:/app/server.coffee:ro"
|
|
||||||
# - "${PWD}/fftcg.db:/app/fftcg.db"
|
|
||||||
ports:
|
|
||||||
- "3000:3000"
|
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:alpine
|
image: redis:alpine
|
||||||
restart: "no"
|
restart: "no"
|
||||||
|
|
||||||
|
backend:
|
||||||
|
build:
|
||||||
|
context: ./backend
|
||||||
|
target: devStage
|
||||||
|
restart: "no"
|
||||||
|
volumes:
|
||||||
|
- "${PWD}/backend/inc:/app/inc:ro"
|
||||||
|
- "${PWD}/backend/server.coffee:/app/server.coffee:ro"
|
||||||
|
# - "${PWD}/backend/fftcg.db:/app/fftcg.db"
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
|
3
frontend/.browserslistrc
Normal file
3
frontend/.browserslistrc
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
> 1%
|
||||||
|
last 2 versions
|
||||||
|
not ie <= 8
|
17
frontend/.eslintrc.js
Normal file
17
frontend/.eslintrc.js
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
env: {
|
||||||
|
node: true
|
||||||
|
},
|
||||||
|
'extends': [
|
||||||
|
'plugin:vue/essential',
|
||||||
|
'eslint:recommended'
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||||
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
|
||||||
|
},
|
||||||
|
parserOptions: {
|
||||||
|
parser: 'babel-eslint'
|
||||||
|
}
|
||||||
|
}
|
21
frontend/.gitignore
vendored
Normal file
21
frontend/.gitignore
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
.DS_Store
|
||||||
|
node_modules
|
||||||
|
/dist
|
||||||
|
|
||||||
|
# local env files
|
||||||
|
.env.local
|
||||||
|
.env.*.local
|
||||||
|
|
||||||
|
# Log files
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.idea
|
||||||
|
.vscode
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.sw*
|
29
frontend/README.md
Normal file
29
frontend/README.md
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# frontend
|
||||||
|
|
||||||
|
## Project setup
|
||||||
|
```
|
||||||
|
yarn install
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compiles and hot-reloads for development
|
||||||
|
```
|
||||||
|
yarn run serve
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compiles and minifies for production
|
||||||
|
```
|
||||||
|
yarn run build
|
||||||
|
```
|
||||||
|
|
||||||
|
### Run your tests
|
||||||
|
```
|
||||||
|
yarn run test
|
||||||
|
```
|
||||||
|
|
||||||
|
### Lints and fixes files
|
||||||
|
```
|
||||||
|
yarn run lint
|
||||||
|
```
|
||||||
|
|
||||||
|
### Customize configuration
|
||||||
|
See [Configuration Reference](https://cli.vuejs.org/config/).
|
5
frontend/babel.config.js
Normal file
5
frontend/babel.config.js
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
module.exports = {
|
||||||
|
presets: [
|
||||||
|
'@vue/app'
|
||||||
|
]
|
||||||
|
}
|
38
frontend/package.json
Normal file
38
frontend/package.json
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
{
|
||||||
|
"name": "yvk-fftcg-frontend",
|
||||||
|
"version": "0.1.0",
|
||||||
|
|
||||||
|
"description": "FFTCG online using Socket.IO and CraftyJS on Node.js on Docker",
|
||||||
|
"author": "JMM <jmm@yavook.de>",
|
||||||
|
|
||||||
|
"private": true,
|
||||||
|
"license": "UNLICENSED",
|
||||||
|
|
||||||
|
"scripts": {
|
||||||
|
"serve": "vue-cli-service serve",
|
||||||
|
"build": "vue-cli-service build",
|
||||||
|
"lint": "vue-cli-service lint"
|
||||||
|
},
|
||||||
|
|
||||||
|
"dependencies": {
|
||||||
|
"vue": "^2.5.21"
|
||||||
|
},
|
||||||
|
|
||||||
|
"devDependencies": {
|
||||||
|
"craftyjs": "^0.9.0",
|
||||||
|
"bootstrap": "^4.1.3",
|
||||||
|
"jquery": "^3.3.1",
|
||||||
|
"popper.js": "^1.14.5",
|
||||||
|
"socket.io-client": "^2.2.0",
|
||||||
|
|
||||||
|
"@vue/cli-plugin-babel": "^3.3.0",
|
||||||
|
"@vue/cli-plugin-eslint": "^3.3.0",
|
||||||
|
"@vue/cli-service": "^3.3.0",
|
||||||
|
"babel-eslint": "^10.0.1",
|
||||||
|
"eslint": "^5.8.0",
|
||||||
|
"eslint-plugin-vue": "^5.0.0",
|
||||||
|
"pug": "^2.0.3",
|
||||||
|
"pug-plain-loader": "^1.0.0",
|
||||||
|
"vue-template-compiler": "^2.5.21"
|
||||||
|
}
|
||||||
|
}
|
5
frontend/postcss.config.js
Normal file
5
frontend/postcss.config.js
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
module.exports = {
|
||||||
|
plugins: {
|
||||||
|
autoprefixer: {}
|
||||||
|
}
|
||||||
|
}
|
BIN
frontend/public/favicon.ico
Normal file
BIN
frontend/public/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
17
frontend/public/index.html
Normal file
17
frontend/public/index.html
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||||
|
<title>frontend</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<noscript>
|
||||||
|
<strong>We're sorry but frontend doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||||
|
</noscript>
|
||||||
|
<div id="app"></div>
|
||||||
|
<!-- built files will be auto injected -->
|
||||||
|
</body>
|
||||||
|
</html>
|
Before Width: | Height: | Size: 610 KiB After Width: | Height: | Size: 610 KiB |
Before Width: | Height: | Size: 615 KiB After Width: | Height: | Size: 615 KiB |
28
frontend/src/App.vue
Normal file
28
frontend/src/App.vue
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<template>
|
||||||
|
<div id="app">
|
||||||
|
<img alt="Vue logo" src="./assets/logo.png">
|
||||||
|
<HelloWorld msg="Welcome to Your Vue.js App"/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import HelloWorld from './components/HelloWorld.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'app',
|
||||||
|
components: {
|
||||||
|
HelloWorld
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#app {
|
||||||
|
font-family: 'Avenir', Helvetica, Arial, sans-serif;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
text-align: center;
|
||||||
|
color: #2c3e50;
|
||||||
|
margin-top: 60px;
|
||||||
|
}
|
||||||
|
</style>
|
BIN
frontend/src/assets/logo.png
Normal file
BIN
frontend/src/assets/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
58
frontend/src/components/HelloWorld.vue
Normal file
58
frontend/src/components/HelloWorld.vue
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
<template>
|
||||||
|
<div class="hello">
|
||||||
|
<h1>{{ msg }}</h1>
|
||||||
|
<p>
|
||||||
|
For a guide and recipes on how to configure / customize this project,<br>
|
||||||
|
check out the
|
||||||
|
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
|
||||||
|
</p>
|
||||||
|
<h3>Installed CLI Plugins</h3>
|
||||||
|
<ul>
|
||||||
|
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
|
||||||
|
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
|
||||||
|
</ul>
|
||||||
|
<h3>Essential Links</h3>
|
||||||
|
<ul>
|
||||||
|
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
|
||||||
|
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
|
||||||
|
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
|
||||||
|
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
|
||||||
|
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
|
||||||
|
</ul>
|
||||||
|
<h3>Ecosystem</h3>
|
||||||
|
<ul>
|
||||||
|
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
|
||||||
|
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
|
||||||
|
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
|
||||||
|
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
|
||||||
|
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'HelloWorld',
|
||||||
|
props: {
|
||||||
|
msg: String
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||||
|
<style scoped>
|
||||||
|
h3 {
|
||||||
|
margin: 40px 0 0;
|
||||||
|
}
|
||||||
|
ul {
|
||||||
|
list-style-type: none;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
li {
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 10px;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
color: #42b983;
|
||||||
|
}
|
||||||
|
</style>
|
8
frontend/src/main.js
Normal file
8
frontend/src/main.js
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
import Vue from 'vue'
|
||||||
|
import App from './App.vue'
|
||||||
|
|
||||||
|
Vue.config.productionTip = false
|
||||||
|
|
||||||
|
new Vue({
|
||||||
|
render: h => h(App),
|
||||||
|
}).$mount('#app')
|
7920
frontend/yarn.lock
Normal file
7920
frontend/yarn.lock
Normal file
File diff suppressed because it is too large
Load diff
57
package.json
57
package.json
|
@ -1,57 +0,0 @@
|
||||||
{
|
|
||||||
"name": "node-fftcg",
|
|
||||||
"version": "0.0.3",
|
|
||||||
|
|
||||||
"description": "FFTCG online using Socket.IO and CraftyJS on Node.js on Docker",
|
|
||||||
"author": "JMM <jmm@yavook.de>",
|
|
||||||
|
|
||||||
"main": "server.coffee",
|
|
||||||
"private": true,
|
|
||||||
"license": "UNLICENSED",
|
|
||||||
|
|
||||||
"scripts": {
|
|
||||||
"build": "webpack",
|
|
||||||
"watch": "webpack --watch",
|
|
||||||
"start": "webpack && coffee server.coffee",
|
|
||||||
"debug": "webpack --watch & nodemon server.coffee",
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
|
||||||
},
|
|
||||||
|
|
||||||
"devDependencies": {
|
|
||||||
"@babel/core": "^7.1.6",
|
|
||||||
"@babel/preset-env": "^7.1.6",
|
|
||||||
"coffee-loader": "^0.9.0",
|
|
||||||
|
|
||||||
"autoprefixer": "^9.3.1",
|
|
||||||
"css-loader": "^1.0.1",
|
|
||||||
"postcss-loader": "^3.0.0",
|
|
||||||
"node-sass": "^4.10.0",
|
|
||||||
"precss": "^3.1.2",
|
|
||||||
"sass-loader": "^7.1.0",
|
|
||||||
"style-loader": "^0.23.1",
|
|
||||||
|
|
||||||
"nodemon": "^1.18.9",
|
|
||||||
"webpack": "^4.25.1",
|
|
||||||
"webpack-cli": "^3.1.2",
|
|
||||||
|
|
||||||
"bootstrap": "^4.1.3",
|
|
||||||
"craftyjs": "^0.9.0",
|
|
||||||
"jquery": "^3.3.1",
|
|
||||||
"popper.js": "^1.14.5"
|
|
||||||
},
|
|
||||||
|
|
||||||
"dependencies": {
|
|
||||||
"bcrypt": "^3.0.2",
|
|
||||||
"body-parser": "^1.18.3",
|
|
||||||
"coffeescript": "^2.3.2",
|
|
||||||
"connect-redis": "^3.4.0",
|
|
||||||
"express": "^4.16.4",
|
|
||||||
"express-session": "^1.15.6",
|
|
||||||
"express-socket.io-session": "^1.3.5",
|
|
||||||
"helmet": "^3.15.0",
|
|
||||||
"pug": "^2.0.3",
|
|
||||||
"socket.io": "^2.2.0",
|
|
||||||
"socket.io-client": "^2.2.0",
|
|
||||||
"sqlite3": "^4.0.4"
|
|
||||||
}
|
|
||||||
}
|
|
Reference in a new issue