-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create applications #8
Merged
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
5518c80
Add cache from hs_hub
seanjparker e61376e
Fix makefile for hs_application
seanjparker 58e15a3
Add application sections and form flow
seanjparker 07da259
Add dropdown support in application
seanjparker e51a1ff
Fix country spelling in questions
seanjparker 4cc081a
Add support for radio inputs
seanjparker dcb7a38
Move material-dashboard.js to external js
seanjparker 80db993
Add required attribute in form
seanjparker 885cc88
Add name to each input for form submission
seanjparker 9287973
Add inversify and typeorm dependency
seanjparker 691cf68
Add dependency injection for routes + controllers
seanjparker dbcf8bd
Rename route and repository files for applications
seanjparker a095a29
Add class-validation, typeorm
seanjparker 3977f47
Add di for routes, controllers + services
seanjparker 37d9764
Add ava for tests instead of jest
seanjparker 1207739
Make repositories easier to mock
seanjparker e2455b6
Add application service test
seanjparker 89124f7
Remove postgres dependency from travis CI
seanjparker 58147de
Move nyc config into package.json
seanjparker 676fa18
Add adapted cache tests from hs_hub
seanjparker dec4fd9
Add codecov to travis CI script
seanjparker 4dde9da
Cleanup services and controller
seanjparker ea21070
Add supertest for e2e tests
seanjparker 9983bdd
Move controller tests to integration test folder
seanjparker 6d6f709
Add e2e tests, fix imports in integration tests
seanjparker a7469fd
Update applicant model with optional annotations
seanjparker 5c604c0
Add file upload support on front-end
seanjparker 5545608
Add support for file uploads and dropbox storage
seanjparker 7deb308
Add controller and service tests for file upload
seanjparker f7be913
Move comment in .env.example
seanjparker 4aed7c9
Rename applicationService/Repo to applicantService
seanjparker c309ed2
Update inverify with new applicant naming
seanjparker 81610d7
Add gulp to build process
seanjparker 184574b
Update tests to use new applicant service name
seanjparker 9683a97
Update error handler to print simple message
seanjparker 3231f66
Fix display bug for long input boxes
seanjparker 7af45e8
Add comment to clarify form validation todo
seanjparker d385409
Update to new ports
seanjparker b191c32
Fix make up command for production
seanjparker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
.vscode | ||
.git* | ||
.env | ||
.dockerignore | ||
*Dockerfile* | ||
*docker-compose* | ||
|
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 |
---|---|---|
@@ -1,17 +1,23 @@ | ||
# Server set up information | ||
PORT=5000 | ||
ENVIRONMENT="production" | ||
PORT=8010 | ||
ENVIRONMENT=production | ||
|
||
# Database connection information | ||
DB_TYPE="mysql" | ||
DB_HOST="mysql_db" # When using docker, use the docker service name for the value of DB_HOST | ||
DB_PORT=3306 | ||
DB_USER="root" | ||
DB_PASSWORD="root" | ||
DB_DATABASE="hub" | ||
DB_TYPE=mysql | ||
|
||
# When using in production, use the docker DB service name which is "mysql_db" | ||
# Otherwise, in dev, use "localhost" | ||
DB_HOST=mysql_db | ||
DB_PORT=8011 | ||
DB_USER=root | ||
DB_PASSWORD=root | ||
DB_DATABASE=hs_application | ||
|
||
#Session Secret | ||
SESSION_SECRET="cat" | ||
SESSION_SECRET=cat | ||
|
||
# Google Analytics GTAG ID | ||
GOOGLE_ANALYTICS_ID="" | ||
GOOGLE_ANALYTICS_ID=example | ||
|
||
# Dropbox API token | ||
DROPBOX_API_TOKEN=example |
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 |
---|---|---|
|
@@ -9,6 +9,7 @@ dist | |
node_modules | ||
|
||
#Tests coverage reports | ||
.nyc_output | ||
coverage | ||
|
||
#OSX directory files | ||
|
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
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
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
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
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 @@ | ||
CREATE DATABASE IF NOT EXISTS hs_application; |
This file was deleted.
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,35 @@ | ||
version: "2.1" | ||
services: | ||
mysql_db: | ||
image: mysql:5.7 | ||
command: --default-authentication-plugin=mysql_native_password --log_error_verbosity=1 | ||
env_file: | ||
- ../../.env | ||
environment: | ||
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD} | ||
ports: | ||
- "${DB_PORT}:3306" | ||
# The healthcheck is used to ensure the database is running | ||
healthcheck: | ||
test: ["CMD-SHELL", "mysqladmin ping -h localhost --silent"] | ||
timeout: 5s | ||
retries: 10 | ||
networks: | ||
- internal | ||
volumes: | ||
- db_store:/var/lib/mysql | ||
- ../database/:/docker-entrypoint-initdb.d/:ro | ||
|
||
# The volume for the database is persistent across launches | ||
volumes: | ||
db_store: | ||
|
||
# The network allows multiple containers to connect together | ||
networks: | ||
# internal network for hs_hub services | ||
internal: | ||
driver: bridge | ||
# external network for consumer-facing hacker suite services | ||
hacker_suite: | ||
external: | ||
name: hacker_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
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,100 @@ | ||
var gulp = require('gulp'); | ||
var terser = require('gulp-terser'); | ||
var rename = require('gulp-rename'); | ||
var cleanCSS = require('gulp-clean-css'); | ||
var replace = require('gulp-replace'); | ||
var parallel = gulp.parallel; | ||
|
||
const paths = { | ||
css: { | ||
src: ['src/public/css/**/*.css', '!src/public/css/**/*.min.css'], | ||
dest: 'dist/public/css/' | ||
}, | ||
scripts: { | ||
src: ['src/public/js/**/*.js', '!src/public/js/**/*.min.js'], | ||
dest: 'dist/public/js/' | ||
}, | ||
scripts_min: { | ||
src: 'src/public/js/**/*.min.js', | ||
dest: 'dist/public/js/' | ||
}, | ||
views: { | ||
src: 'src/views/**/*.ejs', | ||
dest: 'dist/views/' | ||
}, | ||
images: { | ||
src: ['src/public/img/**/*.jpg', 'src/public/img/**/*.png'], | ||
dest: 'dist/public/img/' | ||
}, | ||
publicRoot: { | ||
src: 'src/public/*', | ||
dest: 'dist/public/' | ||
}, | ||
hackathonSettings: { | ||
src: 'src/settings/*.json', | ||
dest: 'dist/settings/' | ||
} | ||
}; | ||
|
||
function css() { | ||
return gulp.src(paths.css.src) | ||
.pipe(cleanCSS()) | ||
.pipe(rename({ | ||
suffix: '.min' | ||
})) | ||
.pipe(gulp.dest(paths.css.dest)); | ||
} | ||
|
||
function scripts() { | ||
return gulp.src(paths.scripts.src, { | ||
sourcemaps: true | ||
}) | ||
.pipe(terser()) | ||
.pipe(rename({ | ||
suffix: '.min' | ||
})) | ||
.pipe(gulp.dest(paths.scripts.dest)) | ||
} | ||
|
||
function scriptsCopyMin() { | ||
return gulp.src(paths.scripts_min.src) | ||
.pipe(gulp.dest(paths.scripts_min.dest)); | ||
} | ||
|
||
function views() { | ||
return gulp.src(paths.views.src) | ||
/* The regex looks complicated but here are the steps: | ||
* 1. Positive lookbehind -- check that the HTML contains src="|', href="|' | ||
* (this remove changing references to remote resources) | ||
* 2. Check for any charater any number of times, this is the uri | ||
* 3. Positive lookahead for the file extension being .js or .css with no other characters after | ||
* Replaces the match with .min.js or .min.css | ||
*/ | ||
.pipe(replace(/(?<=(src|href)=['"])[\/a-zA-z-_]+(?=\.(js|css)[^a-z])/gm, '$&.min')) | ||
.pipe(gulp.dest(paths.views.dest)); | ||
} | ||
|
||
function images() { | ||
return gulp.src(paths.images.src) | ||
.pipe(gulp.dest(paths.images.dest)); | ||
} | ||
|
||
function copyRemainingPublic() { | ||
return gulp.src(paths.publicRoot.src) | ||
.pipe(gulp.dest(paths.publicRoot.dest)); | ||
} | ||
|
||
function copyHackathonSettings() { | ||
return gulp.src(paths.hackathonSettings.src) | ||
.pipe(gulp.dest(paths.hackathonSettings.dest)); | ||
} | ||
|
||
exports.default = parallel( | ||
images, | ||
views, | ||
scripts, | ||
scriptsCopyMin, | ||
css, | ||
copyRemainingPublic, | ||
copyHackathonSettings | ||
); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file still contains instructions for
hs_hub
but fixing this isn't urgent tbh