-
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
0 parents
commit 8f018c7
Showing
61 changed files
with
14,619 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,57 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es6": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"parserOptions": { | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"no-console": [ | ||
"off" | ||
], | ||
"indent": [ | ||
"error", | ||
2 | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"quotes": [ | ||
"error", | ||
"single" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
], | ||
"space-before-function-paren": [ | ||
"error", | ||
{ | ||
"anonymous": "always", | ||
"named": "never" | ||
} | ||
], | ||
"brace-style": [ | ||
"error", | ||
"stroustrup" | ||
], | ||
"keyword-spacing": [ | ||
"error", | ||
{ | ||
"after": true | ||
} | ||
], | ||
"no-unused-vars": [ | ||
"off" | ||
], | ||
"no-undef": [ | ||
"off" | ||
], | ||
"space-before-blocks": [ | ||
"error" | ||
] | ||
} | ||
} |
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,37 @@ | ||
# Declare files that will always have LF line endings on checkout. | ||
|
||
*.html text eol=lf | ||
*.scss text eol=lf | ||
*.sass text eol=lf | ||
*.css text eol=lf | ||
*.js text eol=lf | ||
*.json text eol=lf | ||
*.svg text eol=lf | ||
*.yml text eol=lf | ||
*.yaml text eol=lf | ||
*.md text eol=lf | ||
|
||
.babelrc text eol=lf | ||
.gitignore text eol=lf | ||
.gitattributes text eol=lf | ||
|
||
LICENSE text eol=lf | ||
|
||
# Denote all files that are truly binary and should not be modified. | ||
|
||
*.png binary | ||
*.jpg binary | ||
*.jpeg binary | ||
*.gif binary | ||
*.bmp binary | ||
*.ai binary | ||
*.psd binary | ||
*.pdf binary | ||
|
||
*.otf binary | ||
*.eot binary | ||
*.ttf binary | ||
*.woff binary | ||
*.woff2 binary | ||
*.zip binary | ||
*.rar binary |
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 @@ | ||
node_modules |
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,16 @@ | ||
FROM node:latest | ||
|
||
RUN mkdir -p /usr/src/app/react-src | ||
WORKDIR /usr/src/app | ||
|
||
RUN npm install -g nodemon | ||
|
||
COPY package.json /usr/src/app/ | ||
RUN npm install | ||
|
||
COPY react-src/package.json /usr/src/app/react-src | ||
RUN npm install | ||
|
||
COPY . /usr/src/app | ||
|
||
EXPOSE 3000 4200 |
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 @@ | ||
module.exports = { | ||
db: process.env.DB || 'mongodb://localhost/track-suite' | ||
}; |
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,13 @@ | ||
const mongoose = require('mongoose'); | ||
|
||
const TestRecordSchema = new mongoose.Schema({ | ||
// project: { | ||
// type: String, | ||
// required: [true, 'project is required.'], | ||
// }, | ||
record: { | ||
type: mongoose.Schema.Types.Mixed, | ||
}, | ||
}); | ||
|
||
const TestRecord = module.exports = mongoose.model('test_record', TestRecordSchema); |
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,59 @@ | ||
const mongoose = require('mongoose'); | ||
const unique = require('mongoose-unique-validator'); | ||
const validate = require('mongoose-validator'); | ||
|
||
const nameValidator = [ | ||
validate({ | ||
validator: 'isLength', | ||
arguments: [0, 40], | ||
message: 'Name must not exceed {ARGS[1]} characters.' | ||
}) | ||
]; | ||
|
||
const emailValidator = [ | ||
validate({ | ||
validator: 'isLength', | ||
arguments: [0, 40], | ||
message: 'Email must not exceed {ARGS[1]} characters.' | ||
}), | ||
validate({ | ||
validator: 'isEmail', | ||
message: 'Email must be valid.' | ||
}) | ||
]; | ||
|
||
const ageValidator = [ | ||
// TODO: Make some validations here... | ||
]; | ||
|
||
const genderValidator = [ | ||
// TODO: Make some validations here... | ||
]; | ||
|
||
// Define the database model | ||
const UserSchema = new mongoose.Schema({ | ||
name: { | ||
type: String, | ||
required: [true, 'Name is required.'], | ||
validate: nameValidator | ||
}, | ||
email: { | ||
type: String, | ||
required: [true, 'Email is required.'], | ||
unique: true, | ||
validate: emailValidator | ||
}, | ||
age: { | ||
type: Number, | ||
validate: ageValidator | ||
}, | ||
gender: { | ||
type: String, | ||
validate: genderValidator | ||
} | ||
}); | ||
|
||
// Use the unique validator plugin | ||
UserSchema.plugin(unique, { message: 'That {PATH} is already taken.' }); | ||
|
||
const User = module.exports = mongoose.model('user', UserSchema); |
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,18 @@ | ||
{ | ||
"name": "track-suite", | ||
"version": "0.1.0", | ||
"main": "server.js", | ||
"scripts": { | ||
"start": "node server", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"keywords": [], | ||
"license": "MIT", | ||
"dependencies": { | ||
"body-parser": "1.19.0", | ||
"cors": "2.8.5", | ||
"express": "4.17.1", | ||
"express-rate-limit": "5.1.3", | ||
"mongoose": "5.9.13" | ||
} | ||
} |
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,23 @@ | ||
{ | ||
"main.css": "static/css/main.9d265314.css", | ||
"main.css.map": "static/css/main.9d265314.css.map", | ||
"main.js": "static/js/main.4174b5c6.js", | ||
"main.js.map": "static/js/main.4174b5c6.js.map", | ||
"static/media/brand-icons.eot": "static/media/brand-icons.13db00b7.eot", | ||
"static/media/brand-icons.svg": "static/media/brand-icons.a1a749e8.svg", | ||
"static/media/brand-icons.ttf": "static/media/brand-icons.c5ebe0b3.ttf", | ||
"static/media/brand-icons.woff": "static/media/brand-icons.a046592b.woff", | ||
"static/media/brand-icons.woff2": "static/media/brand-icons.e8c322de.woff2", | ||
"static/media/flags.png": "static/media/flags.9c74e172.png", | ||
"static/media/icons.eot": "static/media/icons.8e3c7f55.eot", | ||
"static/media/icons.svg": "static/media/icons.962a1bf3.svg", | ||
"static/media/icons.ttf": "static/media/icons.b87b9ba5.ttf", | ||
"static/media/icons.woff": "static/media/icons.faff9214.woff", | ||
"static/media/icons.woff2": "static/media/icons.0ab54153.woff2", | ||
"static/media/outline-icons.eot": "static/media/outline-icons.701ae6ab.eot", | ||
"static/media/outline-icons.svg": "static/media/outline-icons.82f60bd0.svg", | ||
"static/media/outline-icons.ttf": "static/media/outline-icons.ad97afd3.ttf", | ||
"static/media/outline-icons.woff": "static/media/outline-icons.ef60a4f6.woff", | ||
"static/media/outline-icons.woff2": "static/media/outline-icons.cd6c777f.woff2", | ||
"static/media/tracksuite.jpg": "static/media/tracksuite.85684627.jpg" | ||
} |
Binary file not shown.
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 @@ | ||
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="manifest" href="/manifest.json"><link rel="shortcut icon" href="/favicon.ico"><title>TRACK SUITE</title><link href="/static/css/main.9d265314.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script type="text/javascript" src="/static/js/main.4174b5c6.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.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.