This repository has been archived by the owner on Jul 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Week 2
Alano Terblanche edited this page Aug 26, 2018
·
5 revisions
Covered in this week:
- Introducing MEAN
- Node.js Fundamentals
- Node.js Server
- Hosting html pages
- Parsing parameters from url
- Url routing
- Code Examples covered
If you're using IntelliJ: IntelliJ NodeJs
Please still go through the Alexandria notes
This will create a package.json file
npm init
Download and install Express package into node_modules folder inside your project & add express (latest version) to the list of dependencies in pakcage.json file
npm install express --save
To run your application
node <application-name>.js
Please look at code examples folder for examples of running code
- add a new function that removes all the elements in the queue
- add a new function that adds set of items into the queue
- E.g: queue.addAll([3,7,1,9])
- add a function that pops (dequeues) N elements from the queue. The function should reject the input if there is no enough element to be removed.
- E.g: queue.dequeueN(2); // pop 2 elements
- add a new function that prints the content of the queue with their indexes. The output can be something like:
- 1–>34
- 2–>30
- 3–>11
- 4–>-3