Skip to content

Commit b8fdd72

Browse files
committed
Angular build
1 parent 3ac2ec5 commit b8fdd72

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+5267
-397
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
.DS_Store
1+
.DS_Store
2+
script.sh

client/src/app/app.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Router, NavigationStart } from '../../node_modules/@angular/router';
99
})
1010
export class AppComponent {
1111

12-
constructor(private sessionService: SessionService, private router: Router, private renderer: Renderer2) {
12+
constructor(public sessionService: SessionService, public router: Router, public renderer: Renderer2) {
1313

1414
this.router.events
1515
.subscribe((event) => {

client/src/app/app.module.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { IsLoggedOutGuardService } from "../guards/isLoggedOut.guard";
2121
import { IsLoggedInGuardService } from "../guards/isLoggedIn.guard";
2222
import { RecordVideoComponent } from './record-video/record-video.component';
2323
import { NotfoundComponent } from './notfound/notfound.component';
24-
import { FileSelectDirective } from 'ng2-file-upload';
24+
import { FileUploadModule } from 'ng2-file-upload';
2525
import { PerformancesComponent } from './performances/performances.component';
2626
import { PerformanceDetailComponent } from './performance-detail/performance-detail.component';
2727

@@ -36,13 +36,13 @@ import { PerformanceDetailComponent } from './performance-detail/performance-det
3636
FilterPipe,
3737
EntryFormComponent,
3838
LoadingComponent,
39-
FileSelectDirective,
4039
RecordVideoComponent,
4140
NotfoundComponent,
4241
PerformancesComponent,
4342
PerformanceDetailComponent,
4443
],
4544
imports: [
45+
FileUploadModule,
4646
BrowserModule,
4747
RouterModule.forRoot(routes),
4848
FormsModule,

client/src/app/entry-form/entry-form.component.ts

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export class EntryFormComponent implements OnInit {
1515
title: string = "";
1616
artist: string = "";
1717
youtube_url: string = "";
18+
lyrics: string = "";
1819

1920
redirect: boolean = false;
2021

client/src/app/login/login.component.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ import { Router } from "@angular/router";
99
})
1010
export class LoginComponent implements OnInit {
1111
error: string;
12-
constructor(private sessionService: SessionService, private router: Router) {}
12+
username: string;
13+
password: string;
14+
constructor(public sessionService: SessionService, public router: Router) {}
1315

1416
ngOnInit() {}
1517

client/src/app/signup/signup.component.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
22
import { SessionService } from '../../services/session.service';
33
import { Router } from '@angular/router';
44
import { FileUploader } from 'ng2-file-upload';
5+
import { environment } from '../../environments/environment';
56

67
@Component({
78
selector: 'app-signup',
@@ -10,14 +11,17 @@ import { FileUploader } from 'ng2-file-upload';
1011
})
1112
export class SignupComponent implements OnInit {
1213
error: string;
14+
username: string;
15+
password: string;
16+
file: string;
1317

1418
url = '';
1519

16-
constructor(private sessionService: SessionService, private router: Router) {
20+
constructor(public sessionService: SessionService, public router: Router) {
1721
}
1822

1923
uploader: FileUploader = new FileUploader({
20-
url: `http://localhost:3000/api/auth/signup`,
24+
url: `${environment.BASEURL}/api/auth/signup`,
2125
method: 'POST'
2226
});
2327

client/src/app/songs-list/songs-list.component.ts

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { SongsService } from '../../services/songs.service';
99
})
1010
export class SongsListComponent implements OnInit {
1111
songs: Array<object>;
12+
search: string;
1213

1314
constructor(private songsService: SongsService) { }
1415

server/app.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ require('dotenv').config();
33
const bodyParser = require('body-parser');
44
const cookieParser = require('cookie-parser');
55
const express = require('express');
6-
const favicon = require('serve-favicon');
76
const mongoose = require('mongoose');
87
const logger = require('morgan');
98
const path = require('path');
@@ -14,7 +13,7 @@ const cors = require('cors');
1413
const DBURL = process.env.MONGODB_URI;
1514

1615
mongoose.Promise = Promise;
17-
mongoose.connect(DBURL, {useMongoClient: true})
16+
mongoose.connect(DBURL, { useNewUrlParser: true })
1817
.then(() => {
1918
console.log(`Connected to Mongo on ${DBURL}`)
2019
}).catch(err => {
@@ -72,8 +71,6 @@ app.set('view engine', 'hbs');
7271
app.use(express.static(path.join(__dirname, 'public')));
7372
app.use(express.static(path.join(__dirname, 'videos')));
7473

75-
app.use(favicon(path.join(__dirname, 'public', 'images', 'favicon.ico')));
76-
7774
require('./routes')(app);
7875

7976
module.exports = app;

0 commit comments

Comments
 (0)