aboutsummaryrefslogtreecommitdiffstats
path: root/src/backend
diff options
context:
space:
mode:
authorMaks Jopek <maksymilian.jopek@prym-soft.pl>2021-04-04 01:53:24 +0200
committerMaks Jopek <maksymilian.jopek@prym-soft.pl>2021-04-04 01:53:24 +0200
commit292257d627bd1dfeafd772ac6457e2f54c2b73ba (patch)
treeb7962648b87ab709e8529075ce912950019adaee /src/backend
parenteee4ee32dd667ed6efd31ddcf8f64217b7e16b60 (diff)
downloadfia-292257d627bd1dfeafd772ac6457e2f54c2b73ba.tar.gz
fia-292257d627bd1dfeafd772ac6457e2f54c2b73ba.tar.zst
fia-292257d627bd1dfeafd772ac6457e2f54c2b73ba.zip
One step closer to the end
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/ts/api/login.ts19
-rw-r--r--src/backend/ts/index.ts15
-rw-r--r--src/backend/tsconfig.json9
3 files changed, 0 insertions, 43 deletions
diff --git a/src/backend/ts/api/login.ts b/src/backend/ts/api/login.ts
deleted file mode 100644
index 045f408..0000000
--- a/src/backend/ts/api/login.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-"use strict";
-import { Request, Response } from 'express';
-import fetch from "node-fetch";
-export default async function apiLogin(req: Request, res: Response) {
- let response = await fetch("https://jopek.eu/maks/szkola/apkKli/fiaFiles/fia.php", {
- method: "POST",
- headers: {
- 'Accept': 'application/json',
- 'Content-Type': 'application/json',
- },
- body: JSON.stringify({
- apiKey: process.env.API_KEY,
- stmt: "SELECT `data` FROM `fia` WHERE `started`= ?",
- params: [false]
- }),
- });
- let resText = await response.text()
- res.send(resText);
-} \ No newline at end of file
diff --git a/src/backend/ts/index.ts b/src/backend/ts/index.ts
deleted file mode 100644
index a6dab5b..0000000
--- a/src/backend/ts/index.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import express from 'express';
-import login from './api/login';
-import * as dotenv from 'dotenv';
-
-dotenv.config();
-const app = express();
-const PORT = 8000;
-
-app.use("/", express.static("./public"));
-
-app.get('/login', (req, res) => login(req, res));
-
-app.listen(PORT, () => {
- console.log(`[server]: Server is running at https://localhost:${PORT}`);
-}); \ No newline at end of file
diff --git a/src/backend/tsconfig.json b/src/backend/tsconfig.json
deleted file mode 100644
index 760fd4c..0000000
--- a/src/backend/tsconfig.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "extends": "../../tsconfig.json",
- "include": [
- "ts/**/*"
- ],
- "compilerOptions": {
- "outDir": "./js"
- }
-} \ No newline at end of file