created general outline of website
This commit is contained in:
18
src-manager/index.js
Normal file
18
src-manager/index.js
Normal 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
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
15
src-manager/package.json
Normal 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"
|
||||
}
|
||||
}
|
||||
20
src-manager/pages/index.html
Normal file
20
src-manager/pages/index.html
Normal 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>
|
||||
0
src-manager/pages/new-news.html
Normal file
0
src-manager/pages/new-news.html
Normal file
Reference in New Issue
Block a user