some backend stuff and getting fe to build

This commit is contained in:
iamBadgers
2024-03-05 12:15:18 -08:00
parent 4d469ff1d5
commit 37efd3949d
18 changed files with 2647 additions and 26 deletions

3
.gitignore vendored
View File

@@ -1,6 +1,7 @@
.DS_Store
node_modules
/dist
frontent/dist
backend/dist
# sqlite file
*.db
*.sqbpro

33
backend/.eslintrc.js Normal file
View File

@@ -0,0 +1,33 @@
module.exports = {
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"overrides": [
{
"env": {
"node": true
},
"files": [
".eslintrc.{js,cjs}"
],
"parserOptions": {
"sourceType": "script"
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
}
}

2505
backend/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

22
backend/package.json Normal file
View File

@@ -0,0 +1,22 @@
{
"name": "backend",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@types/express": "^4.17.21",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"eslint": "^8.57.0",
"typescript": "^5.3.3"
},
"dependencies": {
"express": "^4.18.3"
}
}

11
backend/src/app.ts Normal file
View File

@@ -0,0 +1,11 @@
import express from 'express';
const app = express();
const port = 3000;
app.get('/', (req, res) => {
res.send('Hello World!');
});
app.listen(port, () => {
return console.log(`Express is listening at http://localhost:${port}`);
});

11
backend/tsconfig.json Normal file
View File

@@ -0,0 +1,11 @@
{
"compilerOptions": {
"module": "commonjs",
"esModuleInterop": true,
"target": "es6",
"moduleResolution": "node",
"sourceMap": true,
"outDir": "dist"
},
"lib": ["es2015"]
}

29
frontend/dist/assets/index-BJnL3x4A.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
frontend/dist/favicon.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

24
frontend/dist/index.html vendored Normal file
View File

@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin="anonymous">
<link rel="preload" as="style" onload="this.rel='stylesheet'" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&display=swap">
<link rel="preload" as="font" type="font/eot" href="/assets/materialdesignicons-webfont-DttUABo4.eot" crossorigin="anonymous">
<link rel="preload" as="font" type="font/woff2" href="/assets/materialdesignicons-webfont-CYDMK1kx.woff2" crossorigin="anonymous">
<link rel="preload" as="font" type="font/woff" href="/assets/materialdesignicons-webfont-CgCzGbLl.woff" crossorigin="anonymous">
<link rel="preload" as="font" type="font/ttf" href="/assets/materialdesignicons-webfont-D3kAzl71.ttf" crossorigin="anonymous">
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Welcome to Vuetify 3</title>
<script type="module" crossorigin src="/assets/index-BJnL3x4A.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-Iv1C9NNg.css">
</head>
<body>
<div id="app"></div>
</body>
</html>

View File

@@ -13,12 +13,8 @@ import App from './App.vue'
// Composables
import { createApp } from 'vue'
async function run() {
const app = createApp(App)
const app = createApp(App)
registerPlugins(app)
registerPlugins(app)
app.mount('#app')
}
run()
app.mount('#app')

View File

@@ -12,8 +12,6 @@ import router from '../router'
// Types
import type { App } from 'vue'
const defaultDatabaseFileName = './testdb.db'
export async function registerPlugins(app: App) {
export function registerPlugins(app: App) {
app.use(vuetify).use(router).use(pinia)
}

View File

@@ -1,14 +0,0 @@
import { open } from 'sqlite'
const defaultDatabaseFileName = './testdb.db'
export default {
install(app, options) {
// let database = await open({
// filename: defaultDatabaseFileName,
// driver: sqlite3.Database
// })
console.log('potato')
}
}

View File

@@ -1,6 +1,6 @@
import { createRouter, createWebHashHistory } from 'vue-router'
import GameList from '../vues/GameList'
import GameList from '../vues/GameList.vue'
const rootPath = {
path: '/',