diff options
| author | 8cy <[email protected]> | 2020-05-05 15:17:58 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-05-05 15:17:58 -0700 |
| commit | 7a26c1a3727b7072835680687ebb38473e1a09cc (patch) | |
| tree | 1faf5a6cb771737570c04fc813fd5f266c95fe7c /src/ws | |
| parent | add genservers (diff) | |
| download | dep-core-7a26c1a3727b7072835680687ebb38473e1a09cc.tar.xz dep-core-7a26c1a3727b7072835680687ebb38473e1a09cc.zip | |
add build scripts, remove dist
- remove some db errors, namely ones that are bs like no on doc type errors
- move ws to spike
- remove copy npm scripts i think
- remove .env and package
Diffstat (limited to 'src/ws')
| -rw-r--r-- | src/ws/favicon.ico | bin | 19125 -> 0 bytes | |||
| -rw-r--r-- | src/ws/layouts/layout.hbs | 19 | ||||
| -rw-r--r-- | src/ws/public/css/main.css | 116 | ||||
| -rw-r--r-- | src/ws/views/error.hbs | 1 | ||||
| -rw-r--r-- | src/ws/views/index.hbs | 1 | ||||
| -rw-r--r-- | src/ws/ws.ts | 54 |
6 files changed, 0 insertions, 191 deletions
diff --git a/src/ws/favicon.ico b/src/ws/favicon.ico Binary files differdeleted file mode 100644 index 7f426f3..0000000 --- a/src/ws/favicon.ico +++ /dev/null diff --git a/src/ws/layouts/layout.hbs b/src/ws/layouts/layout.hbs deleted file mode 100644 index 844e9da..0000000 --- a/src/ws/layouts/layout.hbs +++ /dev/null @@ -1,19 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>{{title}}</title> - <link rel="stylesheet" href="css/main.css"> - <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> - </head> - <body> - <div title="Status: Online"> - {{body}} - </div> - - <div class="footer"> - <p>Copyright © 2020 - <a href="https://cyne.cf">s1nical</a></p> - </div> - </body> -</html>
\ No newline at end of file diff --git a/src/ws/public/css/main.css b/src/ws/public/css/main.css deleted file mode 100644 index 993c46a..0000000 --- a/src/ws/public/css/main.css +++ /dev/null @@ -1,116 +0,0 @@ -@import url('https://fonts.googleapis.com/css?family=Fira+Mono:400'); - -body { - display: flex; - width: 100vw; - height: 100vh; - align-items: center; - justify-content: center; - margin: 0; - background: #131313; - color: #fff; - font-size: 96px; - font-family: 'Fira Mono', monospace; - letter-spacing: -7px; -} - -div { - animation: glitch 1s linear infinite; -} - -@keyframes glitch { - - 2%, - 64% { - transform: translate(2px, 0) skew(0deg); - } - - 4%, - 60% { - transform: translate(-2px, 0) skew(0deg); - } - - 62% { - transform: translate(0, 0) skew(5deg); - } -} - -div:before, -div:after { - content: attr(title); - position: absolute; - left: 0; -} - -div:before { - animation: glitchTop 1s linear infinite; - clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%); - -webkit-clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%); -} - -@keyframes glitchTop { - - 2%, - 64% { - transform: translate(2px, -2px); - } - - 4%, - 60% { - transform: translate(-2px, 2px); - } - - 62% { - transform: translate(13px, -1px) skew(-13deg); - } -} - -div:after { - animation: glitchBotom 1.5s linear infinite; - clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%); - -webkit-clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%); -} - -@keyframes glitchBotom { - - 2%, - 64% { - transform: translate(-2px, 0); - } - - 4%, - 60% { - transform: translate(-2px, 0); - } - - 62% { - transform: translate(-22px, 5px) skew(21deg); - } -} - -#green { - color: #05ffa1 -} - -a { - color: white; - text-decoration: none; - transition: 0.5s; -} - -a:hover { - color: rgb(223, 222, 222); - text-decoration: none; - transition: 0.5s; -} - -.footer { - position: fixed; - left: 0; - bottom: 0; - width: 100%; - color: white; - text-align: center; - font-size: 15px; - letter-spacing: -1px; -}
\ No newline at end of file diff --git a/src/ws/views/error.hbs b/src/ws/views/error.hbs deleted file mode 100644 index fe49573..0000000 --- a/src/ws/views/error.hbs +++ /dev/null @@ -1 +0,0 @@ -Error: {{errtype}}
\ No newline at end of file diff --git a/src/ws/views/index.hbs b/src/ws/views/index.hbs deleted file mode 100644 index 5253033..0000000 --- a/src/ws/views/index.hbs +++ /dev/null @@ -1 +0,0 @@ -Status: Online
\ No newline at end of file diff --git a/src/ws/ws.ts b/src/ws/ws.ts deleted file mode 100644 index 08f9581..0000000 --- a/src/ws/ws.ts +++ /dev/null @@ -1,54 +0,0 @@ -import express from 'express'; -import hbs from 'express-handlebars'; -import bodyParser from 'body-parser'; -import path from 'path'; - -class WebSocket { - constructor(token, port, client) { - this.token = token; - this.client = client; - - this.app = express() - this.app.engine('hbs', hbs({ - extname: 'hbs', - defaultLayout: 'layout', - layoutsDir: __dirname + '/layouts' - })) - this.app.set('views', path.join(__dirname, 'views')) - this.app.set('view engine', 'hbs') - this.app.use(express.static(path.join(__dirname, 'public'))) - this.app.use(bodyParser.urlencoded({ extended: false })) - this.app.use(bodyParser.json()) - - this.registerRoots() - - this.server = this.app.listen(port, () => { - console.log(`Websocket listening on port ${this.server.address().port}`) - }) - } - - checkToken(_token) { - return (_token == this.token) - } - - // http://localhost:port?token=123456 - registerRoots() { - this.app.get('/', (req, res) => { - var _token = req.query.token - // if (!this.checkToken(_token)) { - // res.render('error', { - // title: 's1nical - Error', - // errtype: 'INVALID TOKEN' - // }) - // return - // } - - res.render('index', { - title: 'Uwufier - Status', - token: _token - }) - }) - } -} - -module.exports = WebSocket
\ No newline at end of file |