Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,25 @@ mongoose.connection.on('error', (err) => {
}
});
app.use(cors());

app.set('views', path.join(__dirname,'views'));
app.set('view engine', 'ejs');
app.engine('html', require('ejs').renderFile);

app.use(express.static(path.join(__dirname, 'client')));

app.use(bodyparser.json());

app.use(bodyparser.urlencoded({ extended: false }));

app.use('/', index);

app.listen(port, () => {
console.log('server started at port: ' + port);
});
app.get('*',(req,res)=>
{
res.sendFile(path.join(__dirname,'views/index.html'))
});

exports = module.exports = app;
Binary file added client.zip
Binary file not shown.
45 changes: 45 additions & 0 deletions client/npm-debug.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 silly lifecycle [email protected]~prestart: no script for prestart, continuing
7 info lifecycle [email protected]~start: [email protected]
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~start: PATH: /usr/share/npm/bin/node-gyp-bin:/home/divya/MediCenter/client/node_modules/.bin:/home/divya/miniconda3/bin:/home/divya/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
10 verbose lifecycle [email protected]~start: CWD: /home/divya/MediCenter/client
11 silly lifecycle [email protected]~start: Args: [ '-c', 'ng serve' ]
12 silly lifecycle [email protected]~start: Returned: code: 1 signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: `ng serve`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/share/npm/lib/utils/lifecycle.js:232:16)
14 verbose stack at emitTwo (events.js:126:13)
14 verbose stack at EventEmitter.emit (events.js:214:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/share/npm/lib/utils/spawn.js:24:14)
14 verbose stack at emitTwo (events.js:126:13)
14 verbose stack at ChildProcess.emit (events.js:214:7)
14 verbose stack at maybeClose (internal/child_process.js:925:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
15 verbose pkgid [email protected]
16 verbose cwd /home/divya/MediCenter/client
17 error Linux 4.15.0-39-generic
18 error argv "/usr/bin/node" "/usr/bin/npm" "start"
19 error node v8.10.0
20 error npm v3.5.2
21 error code ELIFECYCLE
22 error [email protected] start: `ng serve`
22 error Exit status 1
23 error Failed at the [email protected] start script 'ng serve'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the client package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error ng serve
23 error You can get information on how to open an issue for this project with:
23 error npm bugs client
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls client
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never add debug log in your commits, always delete them before opening a PR.

5 changes: 4 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,18 @@
"private": true,
"dependencies": {
"@angular/animations": "~7.0.0",
"@angular/cdk": "~7.2.1",
"@angular/common": "~7.0.0",
"@angular/compiler": "~7.0.0",
"@angular/core": "~7.0.0",
"@angular/forms": "~7.0.0",
"@angular/http": "~7.0.0",
"@angular/material": "~7.2.1",
"@angular/platform-browser": "~7.0.0",
"@angular/platform-browser-dynamic": "~7.0.0",
"@angular/router": "~7.0.0",
"core-js": "^2.5.4",
"hammerjs": "^2.0.8",
"rxjs": "~6.3.3",
"zone.js": "~0.8.26"
},
Expand All @@ -45,4 +48,4 @@
"tslint": "~5.11.0",
"typescript": "~3.1.6"
}
}
}
16 changes: 13 additions & 3 deletions client/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

const routes: Routes = [];

import { MydashComponent } from './mydash/mydash.component';
import { HomeComponent } from './home/home.component';
import { SignupComponent } from './signup/signup.component';
import { SigninComponent } from './signin/signin.component';
import { ConsultComponent } from './consult/consult.component';
const routes: Routes = [
{ path: '', redirectTo: '/home', pathMatch: 'full' },
{path: 'dash', component: MydashComponent},
{path: 'home', component: HomeComponent},
{path: 'signup', component: SignupComponent},
{path: 'consult', component: ConsultComponent},
{path: 'signin', component: SigninComponent}
];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Navbar and table are not something you'll route to, they'll always be on screen so remove their routes and change dash to dashboard in dashboard path.

@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
Expand Down
27 changes: 8 additions & 19 deletions client/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
<!--The content below is only a placeholder and can be replaced.-->
<div style="text-align:center">
<h1>
Welcome to {{ title }}!
</h1>
<img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">
</div>
<h2>Here are some links to help you start: </h2>
<ul>
<li>
<h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2>
</li>
<li>
<h2><a target="_blank" rel="noopener" href="https://github.com/angular/angular-cli/wiki">CLI Documentation</a></h2>
</li>
<li>
<h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2>
</li>
</ul>
<!--
<my-dash></my-dash>
-->

<router-outlet></router-outlet>
<my-nav>
<router-outlet>
</router-outlet>

</my-nav>
3 changes: 3 additions & 0 deletions client/src/app/app.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.pt-64{
padding-top: 64px;
}
1 change: 0 additions & 1 deletion client/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
Expand Down
37 changes: 33 additions & 4 deletions client/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,45 @@
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';

import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import {MatButtonModule} from '@angular/material/button';
import { MynavComponent } from './mynav/mynav.component';
import { LayoutModule } from '@angular/cdk/layout';
import { MatToolbarModule, MatSidenavModule, MatIconModule, MatListModule,
MatGridListModule, MatCardModule, MatMenuModule, MatTableModule, MatPaginatorModule, MatSortModule } from '@angular/material';
import { MydashComponent } from './mydash/mydash.component';
import {MatSelectModule} from '@angular/material/select';
import { HomeComponent } from './home/home.component';
import { ConsultComponent } from './consult/consult.component';
import { SignupComponent } from './signup/signup.component';
import { SigninComponent } from './signin/signin.component';
@NgModule({
declarations: [
AppComponent
AppComponent,
MynavComponent,
MydashComponent,
HomeComponent,
ConsultComponent,
SignupComponent,
SigninComponent
],
imports: [
BrowserModule,
AppRoutingModule
AppRoutingModule,
BrowserAnimationsModule,
MatButtonModule,
MatSelectModule,
LayoutModule,
MatToolbarModule,
MatSidenavModule,
MatIconModule,
MatListModule,
MatGridListModule,
MatCardModule, MatMenuModule,
MatTableModule,
MatPaginatorModule,
MatSortModule
],
providers: [],
bootstrap: [AppComponent]
Expand Down
19 changes: 19 additions & 0 deletions client/src/app/consult/consult.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<div class="center">Consult a Doctor</div>
<div class="selector1">
<mat-form-field>
<mat-select placeholder="Select Speciality">
<mat-option *ngFor="let specialist of specialist" [value]="specialist.value">
{{specialist.viewValue}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="selector2">
<mat-form-field>
<mat-select placeholder="Select Gender">
<mat-option *ngFor="let gender of gender" [value]="gender.value">
{{gender.viewValue}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
19 changes: 19 additions & 0 deletions client/src/app/consult/consult.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.selector1 {
position: absolute;
left:5%;
top:20%;
}
.selector2 {
position: absolute;
left:5%;
top:30%;
}
.center {
position: absolute;
left: 0;
top: 12%;
width: 100%;
text-align: center;
font-size: 30px;
color: blue
}
25 changes: 25 additions & 0 deletions client/src/app/consult/consult.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { ConsultComponent } from './consult.component';

describe('ConsultComponent', () => {
let component: ConsultComponent;
let fixture: ComponentFixture<ConsultComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ConsultComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(ConsultComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
25 changes: 25 additions & 0 deletions client/src/app/consult/consult.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Component} from '@angular/core';
export interface Specialist {
value: string;
viewValue: string;
}
export interface Gender {
value: string;
viewValue: string;
}
@Component({
selector: 'app-consult',
templateUrl: './consult.component.html',
styleUrls: ['./consult.component.scss']
})
export class ConsultComponent {
specialist: Specialist[] = [
{value: '1', viewValue: 'Dermatologist'},
{value: '2', viewValue: 'Physiotherapist'},
{value: '3', viewValue: 'Gynaecologist'}
];
gender: Gender[] = [
{value: 'F', viewValue: 'Female'},
{value: 'M', viewValue: 'Male'}
];
}
18 changes: 18 additions & 0 deletions client/src/app/home/home.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
</style>
</head>
<body>

<div class="image">
<div class="hero-text">
<h1 style="font-size:40px;">MEDICENTER</h1>
<button type="submit" routerLink="/signup">Sign Up</button>
<button type="submit" routerLink="/signin">Sign In</button>
</div>
</div>
</body>
</html>
52 changes: 52 additions & 0 deletions client/src/app/home/home.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
.center {
position: absolute;
top: 12%;
width: 100%;
text-align: center;
font-size: 40px;
color: black;
}
body {
margin: 0;
font-family: Arial, Helvetica, sans-serif;
}
.image {
/* background-image: url("https://images.pexels.com/photos/48604/pexels-photo-48604.jpeg?auto=compress&cs=tinysrgb&h=650&w=940"); */
background-color: white;
height: 450px;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
position: relative;
}
.hero-text {
text-align: center;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: black;
}
button {
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
opacity: 0.9;
}

button:hover {
opacity:1;
}
.example-card {
max-width: 400px;
}

.example-header-image {
background-image: url('https://material.angular.io/assets/img/examples/shiba1.jpg');
background-size: cover;
}

Loading