commit
feda24c31a
@ -0,0 +1,2 @@
|
|||||||
|
DATABASE_URL=mongodb://mongoadmin:something@192.168.177.137:27017
|
||||||
|
PORT=3001
|
@ -0,0 +1 @@
|
|||||||
|
node_modules
|
@ -0,0 +1,4 @@
|
|||||||
|
exports.home = async (req,res)=>
|
||||||
|
{
|
||||||
|
res.render('home.ejs');
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
const mongoose = require('mongoose');
|
||||||
|
const Schema = mongoose.Schema;
|
||||||
|
|
||||||
|
let example =
|
||||||
|
new Schema(
|
||||||
|
{
|
||||||
|
property: {type: String, required: false, max: 100},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const Example = module.exports = mongoose.model('roleRule', example);
|
||||||
|
module.exports.get = (callback, limit)=>
|
||||||
|
{
|
||||||
|
Example.find(callback).limit(limit);
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"name": "masterhcsite",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "masterhcsite",
|
||||||
|
"main": "server.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
|
"start": "node server.js",
|
||||||
|
"devStart":"nodemon --env-file=.env server.js"
|
||||||
|
},
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC"
|
||||||
|
}
|
@ -0,0 +1,141 @@
|
|||||||
|
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@1,900&display=swap');
|
||||||
|
|
||||||
|
body
|
||||||
|
{
|
||||||
|
margin:0;
|
||||||
|
height:100%;
|
||||||
|
width:100%;
|
||||||
|
margin: 0 0 0 0;
|
||||||
|
position:absolute;
|
||||||
|
top:0%;
|
||||||
|
left:0%;
|
||||||
|
font-family: 'lato';
|
||||||
|
background-color: #071c24;
|
||||||
|
}
|
||||||
|
.Footer
|
||||||
|
{
|
||||||
|
font-family:Verdana, sans-serif;
|
||||||
|
color:rgb(14, 19, 19);
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
button
|
||||||
|
{
|
||||||
|
display:inline-block;
|
||||||
|
padding:0%;
|
||||||
|
margin:0;
|
||||||
|
height:10%;
|
||||||
|
width:30%;
|
||||||
|
}
|
||||||
|
.DiscordAddBtn
|
||||||
|
{
|
||||||
|
position:absolute;
|
||||||
|
top:45%;
|
||||||
|
left:calc(50% - 17.5%);
|
||||||
|
height: 10%;
|
||||||
|
width:35%;
|
||||||
|
|
||||||
|
}
|
||||||
|
.githublogo
|
||||||
|
{
|
||||||
|
height: 20px;
|
||||||
|
width: 20px;
|
||||||
|
}
|
||||||
|
.github
|
||||||
|
{
|
||||||
|
display:inline-block;
|
||||||
|
padding:3%;
|
||||||
|
font-family:Verdana, sans-serif;
|
||||||
|
font-size:100%;
|
||||||
|
font-weight:bolder;
|
||||||
|
color:black;
|
||||||
|
position: absolute;
|
||||||
|
top: 55%;
|
||||||
|
left: 50%;
|
||||||
|
width: 8%;
|
||||||
|
height: 4%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
|
a
|
||||||
|
{
|
||||||
|
text-decoration: none;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
h1
|
||||||
|
{
|
||||||
|
display: block;
|
||||||
|
color: rgb(0, 183, 255);
|
||||||
|
font-size: 50px;
|
||||||
|
font-family: 'Lato', sans-serif;
|
||||||
|
font-weight: bolder;
|
||||||
|
text-align: center;
|
||||||
|
position: absolute;
|
||||||
|
height: 1em;
|
||||||
|
left: 50%;
|
||||||
|
top: 30%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.h3
|
||||||
|
{
|
||||||
|
text-align: center;
|
||||||
|
position: absolute;
|
||||||
|
top: 38%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%)
|
||||||
|
}
|
||||||
|
.Container
|
||||||
|
{
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
position: absolute;
|
||||||
|
top:0;
|
||||||
|
left:0;
|
||||||
|
background-color: #fffff08c;
|
||||||
|
}
|
||||||
|
.background
|
||||||
|
{
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
position: absolute;
|
||||||
|
top:0;
|
||||||
|
left:0;
|
||||||
|
background-image: url("../images/wallhaven-650953.jpg");
|
||||||
|
background-size: 100.5% 100%;
|
||||||
|
background-position: 9990% 0%;
|
||||||
|
background-repeat-x: repeat;
|
||||||
|
background-repeat-y: no-repeat;
|
||||||
|
background-attachment: fixed;
|
||||||
|
-webkit-transform: scaleX(-1);
|
||||||
|
transform: scaleX(-1);
|
||||||
|
filter: contrast(1) blur(0.5px) grayscale(0.2)
|
||||||
|
|
||||||
|
}
|
||||||
|
.LoginBT
|
||||||
|
{
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
margin-top: 5vh;
|
||||||
|
margin-right: 5vw;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #7188DA;
|
||||||
|
height: 5vh;
|
||||||
|
width: 10vw;
|
||||||
|
border: 1px solid rgb(0, 0, 0);
|
||||||
|
border-radius: 5px;
|
||||||
|
font-size: 1em;
|
||||||
|
font-weight: bolder;
|
||||||
|
font-family: 'Lato';
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
#login
|
||||||
|
{
|
||||||
|
color:rgb(252, 252, 218);
|
||||||
|
position: relative;
|
||||||
|
top:1vh;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
function redirect()
|
||||||
|
{
|
||||||
|
window.location.href = window.location.origin + '/redirect';
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
const router = require('express').Router();
|
||||||
|
const api = require('../controllers/api.js');
|
||||||
|
|
||||||
|
|
||||||
|
module.exports = ()=>
|
||||||
|
{
|
||||||
|
router.route('/').get(api.home)
|
||||||
|
|
||||||
|
return router;
|
||||||
|
};
|
@ -0,0 +1,25 @@
|
|||||||
|
const express = require('express');
|
||||||
|
var app = express();
|
||||||
|
const path = require('path');
|
||||||
|
const http = require('http');
|
||||||
|
const mongoose = require('mongoose');
|
||||||
|
const morgan = require('morgan')
|
||||||
|
const mongoURI = process.env.mongoDB;
|
||||||
|
|
||||||
|
mongoose.connect(mongoURI);
|
||||||
|
mongoose.connection.on('connected', ()=>{console.log('Connected')})
|
||||||
|
.on('disconnected', ()=>{console.log('Disconnect')})
|
||||||
|
.on('error', (error)=>console.log('Mongoose Error:', error));
|
||||||
|
|
||||||
|
app.use(express.static(path.join(__dirname, "public")));
|
||||||
|
app.use(morgan('dev'))
|
||||||
|
app.set("view engine", "ejs");
|
||||||
|
app.use(require('cors')())
|
||||||
|
app.use(express.json());
|
||||||
|
app.use(express.urlencoded({extended:true}));
|
||||||
|
const server = http.createServer(app);
|
||||||
|
server.listen(process.env.PORT, () =>
|
||||||
|
{
|
||||||
|
app.use('/', require('./routes/routes')());
|
||||||
|
console.log(`Http-Server UP`);
|
||||||
|
});
|
@ -0,0 +1,19 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en-US">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-type" content="text/html;charset=UTF-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
<link rel="icon" type="image/ico" href="images/favicon.ico"/>
|
||||||
|
<title>Rem-chan at your service</title>
|
||||||
|
<link rel="scr" type="text/js" href="js/home.js"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/css/home.css" id="pagesheet"/>
|
||||||
|
<script src="https://unpkg.com/htmx.org@1.9.10"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
</body>
|
||||||
|
<h1>hello world</h1>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
|
Loading…
Reference in new issue