mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 05:14:23 +00:00
lint, git, circleci, basics
This commit is contained in:
24
.circleci/config.yml
Normal file
24
.circleci/config.yml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
version: 2.1
|
||||||
|
orbs:
|
||||||
|
node: circleci/node@5.1.0
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_and_test:
|
||||||
|
executor: node/default
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- node/install-packages:
|
||||||
|
pkg-manager: npm
|
||||||
|
- run:
|
||||||
|
command: npm run build
|
||||||
|
name: Build app
|
||||||
|
- run:
|
||||||
|
command: npm run test
|
||||||
|
name: Run tests
|
||||||
|
- run:
|
||||||
|
command: npm run build-website
|
||||||
|
name: Build documentation
|
||||||
|
- persist_to_workspace:
|
||||||
|
root: ~/project
|
||||||
|
paths:
|
||||||
|
- .
|
||||||
@@ -1,3 +1,12 @@
|
|||||||
|
/*
|
||||||
|
* myevent - .eslintrc.js
|
||||||
|
*
|
||||||
|
* Created by Janis Hutz 02/26/2023, Licensed under the GPL V3 License
|
||||||
|
* https://janishutz.com, development@janishutz.com
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
'env': {
|
'env': {
|
||||||
'browser': true,
|
'browser': true,
|
||||||
|
|||||||
14
.gitignore
vendored
Normal file
14
.gitignore
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#
|
||||||
|
# myevent - .gitignore
|
||||||
|
#
|
||||||
|
# Created by Janis Hutz 02/26/2023, Licensed under the GPL V3 License
|
||||||
|
# https://janishutz.com, development@janishutz.com
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# ignore ALL .log files
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# ignore node_modules (can be rebuilt with npm i --> shrinks repo size)
|
||||||
|
node_modules
|
||||||
@@ -1 +1,12 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>myevent - Free & Open Source event management solution</title>
|
||||||
|
<link rel="stylesheet" href="/css/style.css">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="description" content="Looking for a free and open source event management solution you can host yourself? myevent is a project that does exactly that.">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1></h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,3 +1,12 @@
|
|||||||
|
/*
|
||||||
|
* myevent - app.js
|
||||||
|
*
|
||||||
|
* Created by Janis Hutz 02/26/2023, Licensed under the GPL V3 License
|
||||||
|
* https://janishutz.com, development@janishutz.com
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
const express = require( 'express' );
|
const express = require( 'express' );
|
||||||
let app = express();
|
let app = express();
|
||||||
const path = require( 'path' );
|
const path = require( 'path' );
|
||||||
@@ -8,24 +17,33 @@ const cookieParser = require( 'cookie-parser' );
|
|||||||
const favicon = require( 'serve-favicon' );
|
const favicon = require( 'serve-favicon' );
|
||||||
const http = require( 'http' );
|
const http = require( 'http' );
|
||||||
|
|
||||||
|
const env = process.env.PROD || false;
|
||||||
|
|
||||||
|
const root = process.env.ROOT || '/order';
|
||||||
|
|
||||||
|
// initialise express with middlewares
|
||||||
app.use( expressSession( {
|
app.use( expressSession( {
|
||||||
secret: 'gaoevgoawefgo083tq2rfvöfaf0p8',
|
secret: 'gaoevgoawefgo083tq2rfvöfaf0p8',
|
||||||
resave: true,
|
resave: true,
|
||||||
saveUninitialized: true
|
saveUninitialized: true
|
||||||
} ) );
|
} ) );
|
||||||
|
|
||||||
app.use( bodyParser.urlencoded( { extended: false } ) );
|
app.use( bodyParser.urlencoded( { extended: false } ) );
|
||||||
app.use( bodyParser.json() );
|
app.use( bodyParser.json() );
|
||||||
app.use( cookieParser() );
|
app.use( cookieParser() );
|
||||||
app.use( favicon( path.join( __dirname + '/ui/assets/logo.png' ) ) );
|
app.use( favicon( path.join( __dirname + '/ui/assets/logo.png' ) ) );
|
||||||
|
|
||||||
|
// create 404 handler
|
||||||
app.use( ( request, response ) => {
|
app.use( ( request, response ) => {
|
||||||
response.sendFile( path.join( __dirname + '' ) );
|
response.sendFile( path.join( __dirname + '' ) );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
|
||||||
app.get( '/', ( request, response ) => {
|
if ( root !== '/' ) {
|
||||||
|
app.get( '/', ( request, response ) => {
|
||||||
|
|
||||||
} );
|
} );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const PORT = process.env.PORT || 8080;
|
const PORT = process.env.PORT || 8080;
|
||||||
Reference in New Issue
Block a user