created general outline of website

This commit is contained in:
2024-07-28 22:08:11 +09:00
parent 18c331d486
commit 28c9720239
32 changed files with 3816 additions and 3 deletions

18
src-manager/index.js Normal file
View File

@@ -0,0 +1,18 @@
const express = require('express');
const sqlite3 = require('sqlite3');
const path = require('path');
const app = express();
const port = 3001;
//const db = new sqlite3.Database("../assets/databases/news.db");
app.use(express.static('pages'));
app.use(express.static(path.join(__dirname, "../assets")));
app.use(express.static(path.join(__dirname, "../public")));
app.get('/api/hello', (req, res) => {
res.send('Hello World!');
});
app.listen(port, () => {
console.log(`Manager is now listening on port ${port}`);
});

2250
src-manager/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

15
src-manager/package.json Normal file
View File

@@ -0,0 +1,15 @@
{
"name": "manager",
"version": "1.0.0",
"description": "content manager for sera hp",
"main": "index.js",
"scripts": {
"start": "node index.js"
},
"author": "kenryus",
"license": "ISC",
"dependencies": {
"express": "^4.19.2",
"sqlite3": "^5.1.7"
}
}

View File

@@ -0,0 +1,20 @@
<html>
<head>
<script src="https://unpkg.com/htmx.org@2.0.1" integrity="sha384-QWGpdj554B4ETpJJC9z+ZHJcA/i59TyjxEPXiiUgN2WmTyV5OEZWCD6gQhgkdpB/" crossorigin="anonymous"></script>
</head>
<body>
<h1>Content Manager</h1>
<p>Lorem ipsum dolor sit amet, qui minim labore adipisicing minim sint cillum sint consectetur cupidatat.</p>
<button hx-get="/api/hello"
hx-trigger="click"
hx-swap="afterend"
hx-target="#list"
>
Click Me!
</button>
<p id="list"></p>
</body>
</html>

View File