Skip to content
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

Issue 32 -- update client dependencies (WIP) #44

Closed
wants to merge 12 commits into from
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_STORE
.DS_STORE
.idea/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ There are 3 components required to run YCB.
#### Frontend
This is built using Angular (the new one). Navigate to the folder `frontend` inside the project root in your favorite cli.

Run `npm install` to install the dependencies.
Run `npm ci` to install the dependencies.

Run `npm start` to start the frontend of the app up. You should see the app at `localhost:4200`.

#### Backend
This is built using a Node.js framework called [Nest](https://github.com/nestjs/nest). Navigate to the folder `backend` inside the project root in your favorite cli.

Run `npm install` to install the dependencies.
Run `npm ci` to install the dependencies.

Run `npm start` to start the backend of the app up. You should see the routes at `localhost:3000`. To confirm it's working, sending a GET to `localhost:3000` should yield Hello World!.

Expand Down
106 changes: 13 additions & 93 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@types/node": "^8.10.36",
"@types/winston": "^2.4.4",
"jest": "^21.2.1",
"nodemon": "^1.18.5",
"nodemon": "^1.18.9",
"supertest": "^3.3.0",
"ts-jest": "^21.2.4",
"ts-node": "^3.3.0"
Expand Down
6 changes: 2 additions & 4 deletions backend/src/modules/protected/protected.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,12 @@ export class ProtectedController {
createProgramWithQueries(
@Body("user") user,
@Body("application") application,
@Body("guid") guid,
@Req() req
): any {
return Observable.zip(
this.programService.create(user),
Observable.from(application)
.mergeMap( (query: ApplicationQueryDto) => this.queryService.create(query))
.catch(error => Observable.throw(false))
.catch(() => Observable.throw(false))
)
.map( ([{created}, queriesCreated]) => {
return created === true && queriesCreated === true ? { created: true} : { created: false }
Expand Down Expand Up @@ -145,7 +143,7 @@ export class ProtectedController {
.map(res => res.deleted ? {found: true, deleted: true } : { found: null, deleted: false} )
}

@Post('/query')
@Post('/query/')
updateOrCreateQuery(@Body("query") query, @Body("guid") guid): Promise<any> {
return this.queryService.index({
...query,
Expand Down
1 change: 1 addition & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# compiled output
/tmp
/dist

# dependencies
/node_modules
Expand Down
Loading