mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 05:14:23 +00:00
initial setup
This commit is contained in:
60
.eslintrc.js
Normal file
60
.eslintrc.js
Normal file
@@ -0,0 +1,60 @@
|
||||
module.exports = {
|
||||
'env': {
|
||||
'browser': true,
|
||||
'commonjs': true,
|
||||
'es2021': true,
|
||||
'node': true
|
||||
},
|
||||
'extends': 'eslint:recommended',
|
||||
'overrides': [
|
||||
],
|
||||
'parserOptions': {
|
||||
'ecmaVersion': 'latest'
|
||||
},
|
||||
'rules': {
|
||||
'indent': [
|
||||
'error',
|
||||
4
|
||||
],
|
||||
'linebreak-style': [
|
||||
'error',
|
||||
'unix'
|
||||
],
|
||||
'quotes': [
|
||||
'error',
|
||||
'single'
|
||||
],
|
||||
'semi': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'spaced-comment': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'arrow-spacing': [
|
||||
'error',
|
||||
{ 'before': true, 'after': true }
|
||||
],
|
||||
'func-call-spacing': [
|
||||
'error',
|
||||
'never'
|
||||
],
|
||||
'keyword-spacing': [
|
||||
'error',
|
||||
{ 'before': true, 'after': true }
|
||||
],
|
||||
'key-spacing': [
|
||||
'error',
|
||||
{ 'mode': 'strict' }
|
||||
],
|
||||
'space-before-blocks': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'space-in-parens': [
|
||||
'error',
|
||||
'always'
|
||||
]
|
||||
}
|
||||
};
|
||||
32
app.js
Normal file
32
app.js
Normal file
@@ -0,0 +1,32 @@
|
||||
const express = require( 'express' );
|
||||
let app = express();
|
||||
const path = require( 'path' );
|
||||
const expressSession = require( 'express-session' );
|
||||
const fs = require( 'fs' );
|
||||
const bodyParser = require( 'body-parser' );
|
||||
const cookieParser = require( 'cookie-parser' );
|
||||
const favicon = require( 'serve-favicon' );
|
||||
const http = require( 'http' );
|
||||
|
||||
app.use( expressSession( {
|
||||
secret: 'gaoevgoawefgo083tq2rfvöfaf0p8',
|
||||
resave: true,
|
||||
saveUninitialized: true
|
||||
} ) );
|
||||
app.use( bodyParser.urlencoded( { extended: false } ) );
|
||||
app.use( bodyParser.json() );
|
||||
app.use( cookieParser() );
|
||||
app.use( favicon( path.join( __dirname + '/ui/assets/logo.png' ) ) );
|
||||
|
||||
app.use( ( request, response ) => {
|
||||
response.sendFile( path.join( __dirname + '' ) );
|
||||
} );
|
||||
|
||||
|
||||
app.get( '/', ( request, response ) => {
|
||||
|
||||
} );
|
||||
|
||||
|
||||
const PORT = process.env.PORT || 8080;
|
||||
http.createServer( app ).listen( PORT );
|
||||
0
projectWebsite/docs/index.html
Normal file
0
projectWebsite/docs/index.html
Normal file
1
projectWebsite/index.html
Normal file
1
projectWebsite/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html>
|
||||
Reference in New Issue
Block a user