Aseem Balaski
About
-
Posted Answers
Answer
- Personalizing Learning.
- Rewarding Students' Success.
- Providing Meaningful Feedback.
- Allow Self-Monitoring.
- Setting Clear Goals and Learning Paths.
- Encouraging Collaboration with Others.
- Using a Variety of Learning Tools.
Answer is posted for the following question.
Answer
- Invoice of the vehicle.
- Insurance policy.
- GATT Declaration.
- Bank Draft.
- Bill of Lading or Sea Waybill.
- Import License.
- Purchase Order/Letter of Credit.
- Test report.
Answer is posted for the following question.
How to import new car from japan to india?
Answer
Professional Indemnity Insurance is a type of business insurance , typically for organizations that Professional indemnity insurance covers claims made by the businesses in case their clients have sued them for making them endure any significant financial loss due to their advices and services
Answer is posted for the following question.
(a) professional indemnity insurance?
Answer
A hard money loan is a way for you to borrow money for real estate without using traditional mortgage lenders
Answer is posted for the following question.
Do hard money lenders?
Answer
Here is a series of articles to help you create backend applications in Javascript.
Node.js is now a must, so it is essential for a developer to master it.
I will publish a new article every two days and little by little you will learn everything there is to know about Node.js
To not miss anything follow me on twitter: https://twitter.com/EricTheCoder_
The HTTP module is a set of functions that allow you to create and manage your own web server.
A web server is a set of hardware and software that allow access to hosted files, web page and database stored on a computer.
The web server also consists of an HTTP server. HTTP server is software that understands / receives URLs and requests via the HTTP protocol (the protocol used by the browser to display web pages).
At the simplest level, whenever a browser needs a file or other hosted on a web server, the browser makes the request to the server (it is said to send an HTTP request). When the request reaches the server, the HTTP server processes it and returns the response.
In summary, the bottom line is that although an HTTP server may seem complicated, in fact it is just a succession of requests and responses. You will see here below that NodeJS allows you very easily to create an HTTP server and that it is very easy to read a request and send a response.
Here is an example of creating an HTTP server
Let's see line by line the different steps for creating a server
Loading the HTTP module
Server creation with a callback function. Note that there are two parameters that are passed to the function: req and res.
res.end() tells the server that the response is complete and can now be sent
Starting the server. The server will wait and read the requests that arrive on port 5000.
This is an endless loop. Each time a request will be sent to our server at port 5000 (ex: localhost:5000), the server will execute the callback (see previous code block) and therefore in this case send the response 'Hello World from the server'
If you want to test this server, launch the application
Open your browser and visit localhost:5000
The message 'Hello World from the server' should display in your browser
In fact if you visit any page ex: localhost: 5000/about the same message will always be displayed.
It is possible to read the url path of the request ex: /about or /home etc. and return a different response depending on the path.
The path information is included in the request.
To read information about the request we will use the 'req' object. which as you know contains all the information of the request.
Specifically, the url path is in the 'req.url' property
Here is an example of a small HTTP server which, depending on the url received, displays a different page
HTTP Headers allow the client and the server to pass additional information along with the request or response.
For example, the Header of a request could contain the format of its content ex. HTML or JSON and / or related information for user authentication.
To add a header to the response, we need to add a function before the res.end() function
The writeHead function allows you to specify the content type of the message, either 'text/html'
When running the res.end() function NodeJS will include the Header to the response.
Voila, you have created your first HTTP server. Although this is a very basic server for the moment, remember that an HTTP server is simply a succession of requests and responses.
So, in its simplest form, your web application will do just that. That is to say, process requests and return responses.
Although NodeJS allows us to create our own HTTP server, to create a real web application we would have to code hundreds or even thousands of lines of code in order to handle all the possibilities and all the exceptions.
Fortunately for us there are several NodeJS libraries / frameworks that do this job for us.
The most popular of all is ExpressJS. ExpressJS is a framework (set of libraries) designed with NodeJS in order to greatly simplify web application development.
So we will see in detail later how to use ExpressJS in our NodeJS applications.
Answer is posted for the following question.
How to what does http.createserver do (Javascript Scripting Language)