Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Asif Ansari committed Oct 25, 2018
1 parent b2e1067 commit a34b61d
Show file tree
Hide file tree
Showing 47 changed files with 161 additions and 0 deletions.
17 changes: 17 additions & 0 deletions 01. Getting Started/Must read.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
MUST READ: Angular CLI - Latest Version
Section 1, Lecture 5
Important: In the next lecture, we'll use a tool called the "Angular CLI" to create our Angular project.

With the latest version, this tool will ask you two questions:

1) Do you want to use the Angular Router?

2) Which CSS pre-processor do you want to use?

Simply hit ENTER twice and confirm the default (without entering any value).

The defaults (which we will use therefore) are:

1) No (No router for now, we'll add it later)

2) CSS
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
52 changes: 52 additions & 0 deletions 03. Adding NodeJS to our Project/server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
const app = require("./backend/app");
const debug = require("debug")("node-angular");
const http = require("http");

const normalizePort = val => {
var port = parseInt(val, 10);

if (isNaN(port)) {
// named pipe
return val;
}

if (port >= 0) {
// port number
return port;
}

return false;
};

const onError = error => {
if (error.syscall !== "listen") {
throw error;
}
const bind = typeof port === "string" ? "pipe " + port : "port " + port;
switch (error.code) {
case "EACCES":
console.error(bind + " requires elevated privileges");
process.exit(1);
break;
case "EADDRINUSE":
console.error(bind + " is already in use");
process.exit(1);
break;
default:
throw error;
}
};

const onListening = () => {
const addr = server.address();
const bind = typeof port === "string" ? "pipe " + port : "port " + port;
debug("Listening on " + bind);
};

const port = normalizePort(process.env.PORT || "3000");
app.set("port", port);

const server = http.createServer(app);
server.on("error", onError);
server.on("listening", onListening);
server.listen(port);
5 changes: 5 additions & 0 deletions 04. Working with MongoDB/New Text Document.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Using MongoDB Atlas & IP Whitelist
Section 4, Lecture 48
By selecting the "Free Sandbox" in the previous video, we're using MongoDB Atlas (https://www.mongodb.com/cloud/atlas) in this course - a hosted MongoDB cluster.

There, we added our local IP to the "IP Whitelist". One important note on that: If you're away from the project for a couple of days (or maybe even after one day), you might've received a new local IP by your internet provider. Hence you should update that "IP Whitelist" if you're facing any connection issues!
Binary file not shown.
Binary file not shown.
Binary file added 04. Working with MongoDB/mongodb-03-finished.zip
Binary file not shown.
7 changes: 7 additions & 0 deletions 05. Enhancing the App/New Text Document (2).txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Section Resources
Section 5, Lecture 70
Angular Material Docs: https://material.angular.io/components/categories
Resources for this lecture
enhancing-01-added-routing.zip
enhancing-02-added-update-functionality.zip
enhancing-03-finished.zip
7 changes: 7 additions & 0 deletions 05. Enhancing the App/New Text Document.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Possible Error
Section 5, Lecture 64
Important: You might be getting an error ("can't find property title") when you reload the Edit page after/ during the next lecture.

This is totally normal and will be fixed in lecture 65 :-)

Max
Binary file not shown.
Binary file not shown.
Binary file added 05. Enhancing the App/enhancing-03-finished.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
44 changes: 44 additions & 0 deletions 06. Adding Image Uploads to our App/mime-type.validator.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { AbstractControl } from "@angular/forms";
import { Observable, Observer } from "rxjs";

export const mimeType = (
control: AbstractControl
): Promise<{ [key: string]: any }> | Observable<{ [key: string]: any }> => {
const file = control.value as File;
const fileReader = new FileReader();
const frObs = Observable.create(
(observer: Observer<{ [key: string]: any }>) => {
fileReader.addEventListener("loadend", () => {
const arr = new Uint8Array(fileReader.result).subarray(0, 4);
let header = "";
let isValid = false;
for (let i = 0; i < arr.length; i++) {
header += arr[i].toString(16);
}
switch (header) {
case "89504e47":
isValid = true;
break;
case "ffd8ffe0":
case "ffd8ffe1":
case "ffd8ffe2":
case "ffd8ffe3":
case "ffd8ffe8":
isValid = true;
break;
default:
isValid = false; // Or you can use the blob.type as fallback
break;
}
if (isValid) {
observer.next(null);
} else {
observer.next({ invalidMimeType: true });
}
observer.complete();
});
fileReader.readAsArrayBuffer(file);
}
);
return frObs;
};
Binary file not shown.
Binary file added 07. Adding Pagination/pagination-02-finished.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
7 changes: 7 additions & 0 deletions 09. Authorization/New Text Document.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Section Resources
Section 9, Lecture 119
Mongoose Relations (and how you could combine them when fetching data): http://mongoosejs.com/docs/populate.html
Resources for this lecture
authorization-01-added-user-model.zip
authorization-02-added-server-side-authorization.zip
authorization-03-finished.zip
Binary file not shown.
Binary file not shown.
Binary file added 09. Authorization/authorization-03-finished.zip
Binary file not shown.
8 changes: 8 additions & 0 deletions 10. Handling Errors/New Text Document.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Section Resources
Section 10, Lecture 127
Angular Material Dialog Docs: https://material.angular.io/components/dialog/overview
Resources for this lecture
errors-01-added-dialog.zip
errors-02-finished-main-implementation.zip
errors-03-alternative-approach.zip
Show more (1)
Binary file added 10. Handling Errors/errors-01-added-dialog.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added 10. Handling Errors/errors-04-finished.zip
Binary file not shown.
8 changes: 8 additions & 0 deletions 11. Optimizations/New Text Document.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Section Resources
Section 11, Lecture 138
More on Angular Modules: https://angular.io/guide/ngmodules
Understanding Environment Variables: https://www.twilio.com/blog/2017/08/working-with-environment-variables-in-node-js.html
Resources for this lecture
optimizations-01-added-controllers-changed-middleware.zip
optimizations-02-split-angular-into-modules.zip
optimizations-03-finished.zip
Binary file not shown.
Binary file not shown.
Binary file added 11. Optimizations/optimizations-03-finished.zip
Binary file not shown.
6 changes: 6 additions & 0 deletions 12. Deploying our App/New Text Document.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Section Resources
Section 12, Lecture 144
AWS Elastic Beanstalk Documentation: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/Welcome.html
Resources for this lecture
deployment-01-two-apps.zip
deployment-02-one-app.zip
Binary file added 12. Deploying our App/deployment-01-two-apps.zip
Binary file not shown.
Binary file added 12. Deploying our App/deployment-02-one-app.zip
Binary file not shown.

0 comments on commit a34b61d

Please sign in to comment.