-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
3,342 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["@babel/preset-env", "@babel/preset-react"] | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"name": "personal-raci", | ||
"version": "1.0.0", | ||
"description": "A simple tool to keep track of different projects and how involved I am in them.", | ||
"main": "server/index.js", | ||
"scripts": { | ||
"start": "node server/index.mjs", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/agracey/personal-raci.git" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/agracey/personal-raci/issues" | ||
}, | ||
"homepage": "https://github.com/agracey/personal-raci#readme", | ||
"devDependencies": { | ||
"@babel/core": "^7.14.6", | ||
"@babel/preset-env": "^7.14.7", | ||
"babel-loader": "^8.2.2", | ||
"webpack": "^5.44.0", | ||
"webpack-cli": "^4.7.2" | ||
}, | ||
"dependencies": { | ||
"@babel/preset-react": "^7.14.5", | ||
"express": "^4.17.1", | ||
"express-graphql": "^0.12.0", | ||
"graphql": "^15.5.1", | ||
"preact": "^10.5.14" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Getting Started</title> | ||
<script src="https://unpkg.com/[email protected]"></script> | ||
</head> | ||
<body> | ||
<script src="./index.js"></script> | ||
</body> | ||
</html> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
// import { readFileSync } from 'fs' | ||
|
||
// const postgresql_uri = readFileSync('/services/mypsql/uri', 'utf8') | ||
|
||
import express from 'express' | ||
import expressGraphQL from 'express-graphql' | ||
import schema from './schema' | ||
import root from './resolvers' | ||
|
||
|
||
const app = express() | ||
|
||
app.use(express.static('public')) | ||
|
||
app.use('/graphql', expressGraphQL({ | ||
schema, | ||
rootValue: root, | ||
graphiql: true | ||
})) | ||
|
||
app.listen(8080, () => { | ||
console.log(`personal-raci listening`) | ||
}) | ||
|
||
|
||
|
||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { | ||
buildSchema | ||
} from 'graphql' | ||
|
||
|
||
|
||
export default buildSchema(` | ||
type Project { | ||
name: String! | ||
description: String! | ||
} | ||
type Task { | ||
name: String! | ||
description: String! | ||
} | ||
type Query { | ||
getTasks: [Task] | ||
getProjects: [Project] | ||
} | ||
type Mutation { | ||
addTask(name: String!, description: String): String | ||
editTask(id: ID!, name: String, description: String): String | ||
editProject: String | ||
} | ||
`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
DROP TABLE IF EXISTS TaskItems; | ||
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; | ||
|
||
|
||
CREATE TYPE involvement AS ENUM ('R', 'A', 'C', 'I'); | ||
|
||
|
||
|
||
CREATE TABLE Projects ( | ||
id uuid DEFAULT uuid_generate_v4 (), | ||
name VARCHAR NOT NULL, | ||
description VARCHAR NOT NULL, | ||
|
||
|
||
PRIMARY KEY (id) | ||
) | ||
|
||
CREATE TABLE TaskItems ( | ||
id uuid DEFAULT uuid_generate_v4 (), | ||
name VARCHAR NOT NULL, | ||
description VARCHAR NOT NULL, | ||
level involvement, | ||
project_id uuid, | ||
|
||
|
||
PRIMARY KEY (id), | ||
|
||
CONSTRAINT fk_project | ||
FOREIGN KEY(project_id) | ||
REFERENCES Projects(id) | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { h, render, Component } from 'preact'; | ||
/** @jsx h */ | ||
|
||
|
||
render(( | ||
<div id="foo"> | ||
<span>Hello, world!</span> | ||
<button onClick={ e => alert("hi!") }>Click Me</button> | ||
</div> | ||
), document.body); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// var HtmlWebpackPlugin = require('html-webpack-plugin') | ||
// var CopyWebpackPlugin = require('copy-webpack-plugin'); | ||
|
||
const webpack = require('webpack') | ||
|
||
module.exports = { | ||
entry: './ui/index.jsx', | ||
mode: 'development', | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.(js|jsx)$/, | ||
exclude: /node_modules/, | ||
use: ['babel-loader'] | ||
} | ||
] | ||
}, | ||
resolve: { | ||
extensions: ['*', '.js', '.jsx'], | ||
alias: { | ||
"react": "preact/compat", | ||
"react-dom": "preact/compat" | ||
} | ||
}, | ||
output: { | ||
path: __dirname + '/public', | ||
publicPath: '/', | ||
filename: 'index.js' | ||
}, | ||
// plugins: [ | ||
// new HtmlWebpackPlugin({ | ||
// title: 'Volunteer Checkin', | ||
// inject: true, | ||
// template: 'src/index.html', | ||
// filename: './index.html' | ||
// }), | ||
// new webpack.HotModuleReplacementPlugin(), | ||
// new CopyWebpackPlugin([ | ||
// {from:'src/images',to:'images'} | ||
// ]) | ||
// ] | ||
} |