Skip to content

Commit

Permalink
First commit!
Browse files Browse the repository at this point in the history
  • Loading branch information
chenilim committed Oct 8, 2020
0 parents commit b5b294a
Show file tree
Hide file tree
Showing 62 changed files with 12,255 additions and 0 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
47 changes: 47 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"extends": "airbnb",
"env": {
"node": true,
"es6": true,
"browser": true
},
"rules": {
"indent": [2, "tab", {"SwitchCase": 1}],
"no-tabs": 0,
"comma-dangle": 0,
"max-len": ["warn", { "code": 140 }],
"operator-linebreak": [2, "after"],
"prefer-destructuring": ["warn", {
"array": false,
"object": true
}, {
"enforceForRenamedProperties": false
}],
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
"func-names": [2, "as-needed"],

"import/prefer-default-export": 0,
"import/extensions": [2, "ignorePackages"],
"import/no-extraneous-dependencies": ["error", {"devDependencies": true}],

"no-unexpected-multiline": 1,
"no-lonely-if": 0,
"no-nested-ternary": 0,
"class-methods-use-this": 1,
"lines-between-class-members": ["warn", { "exceptAfterSingleLine": true }],
"no-restricted-syntax": ["error", "ForInStatement", "LabeledStatement", "WithStatement"],
"no-console": 0,
"no-alert": 2,
"object-shorthand": ["error", "properties"],
"no-bitwise": ["error", { "int32Hint": true }],
"no-param-reassign": [2, { "props": false }],
"quotes": [2, "double", { "allowTemplateLiterals": true }],
"brace-style": ["warn", "1tbs", { "allowSingleLine": true }],
"object-curly-newline": ["error", {
"ObjectExpression": { "consistent": true },
"ObjectPattern": { "multiline": true },
"ImportDeclaration": "never",
"ExportDeclaration": { "multiline": true, "minProperties": 3 }
}]
}
}
38 changes: 38 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Created by https://www.gitignore.io/api/node

### Node ###
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
node_modules
dist
pack
bin
debug
__debug_bin
files
octo.db
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"tabWidth": 4,
"useTabs": true,
"semi": false
}
25 changes: 25 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Go: Launch Server",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}/server/main",
"cwd": "${workspaceFolder}"
},
{
"name": "Attach by Process ID",
"processId": "${command:PickProcess}",
"request": "attach",
"skipFiles": [
"<node_internals>/**"
],
"type": "pwa-node"
}
]
}
36 changes: 36 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.PHONY: prebuild clean cleanall pack packdev builddev build watch go goUbuntu

all: build

GOMAIN = ./server/main
GOBIN = ./bin/octoserver

pack:
npm run pack

packdev:
npm run packdev

go:
go build -o $(GOBIN) $(GOMAIN)

goUbuntu:
env GOOS=linux GOARCH=amd64 go build -o $(GOBIN) $(GOMAIN)

builddev: packdev go

build: pack go

watch:
npm run watchdev

prebuild:
npm install

clean:
rm -rf bin
rm -rf dist
rm -rf pack

cleanall: clean
rm -rf node_modules
9 changes: 9 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"port": 8000,
"dbtype": "sqlite3",
"dbconfig": "./octo.db",
"postgres_dbconfig": "dbname=octo sslmode=disable",
"useSSL": false,
"webpath": "./pack",
"filespath": "./files"
}
35 changes: 35 additions & 0 deletions html-templates/index.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<title><%= htmlWebpackPlugin.options.title %></title>

<link rel="stylesheet" href="/main.css">
<link rel="stylesheet" href="/images.css">
<link rel="stylesheet" href="/colors.css">

<script>
window.location.href = "/boards"
</script>
</head>

<body class="container">
<header id="header">
<a href="/">OCTO</a>
</header>

<main id="main">
<p>
<a href="boards">All Boards</a>
</p>
</main>

<footer id="footer">
</footer>

<div id="overlay">
</div>
</body>

</html>
32 changes: 32 additions & 0 deletions html-templates/page.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<title><%= htmlWebpackPlugin.options.title %></title>

<link rel="stylesheet" href="/easymde.min.css">
<link rel="stylesheet" href="/main.css">
<link rel="stylesheet" href="/images.css">
<link rel="stylesheet" href="/colors.css">
</head>

<body class="container">
<header id="header">
<a href="/">OCTO</a>
</header>

<main id="main">
</main>

<footer id="footer">
</footer>

<div id="overlay">
</div>

<div id="modal">
</div>
</body>

</html>
Loading

0 comments on commit b5b294a

Please sign in to comment.