SIGN IN

Programming

23. Node.js Lessons. Domains, asynchronous try.. catch. Part 3.

How and what does app.js consist of? It is made in a way that from the very beginning we create a domain and then launch our app within this domain. Here all modules can be connected, a server gets created, etc. But why do we connect modules here? The reason is that some other modules can be added when the connection happens, and they can connect others, too.

Category: Programming
0

23. Node.js Lessons. Domains, asynchronous try.. catch. Part 2.

So, we continue our lesson. Let us make this example a little bit more complicated by adding work with the files in the following way:

Category: Programming
0

23. Node.js Lessons. Domains, asynchronous try.. catch. Part 1.

Hey all! Our topic for today is Domains. Domains are one of the Node.js options lacking both in standard JavaScript and browser versions of JavaScript. Domains were created to catch any asynchronous errors. For instance, if we look at the server that we’ve explored in one of our previous articles (download the lesson code from here for your convenience), we will see that everything is ok when it’s working

Category: Programming
0

React Lessons. Lesson 14.

Hey all! So, we continue working on our app. We already know how to make simple calls to the server and for 80% of possible cases this knowledge will be enough for executing standard tasks. However, we will learn how to deal with more complicated things, too. So, before moving on toward this task, I’d like to warn you that middleware does not necessarily need to be written by yourself. It means these are such frequently used (re-used) elements that have already been written previously by someone else. We recommend you to explore this resource, where you will find a whole bunch of various middlewares and so on. For example, here is a ready-to-use logger. We’ve created a logger to practice a little bit, but here is an example of a perfect ready-to-use solution.

Category: Programming
0

React Lessons. Lesson 13 Part 2.

"Dear readers! Do not forget about the first part of this article, beginners should start from Lesson 1." So, let us call these elements inside containers/Articles.js by adding the record and calling action creater:

Category: Programming
0

React Lessons. Lesson 13. Part 1.

Our topic for today deals with asynchronous actions. We will start to take our articles from API. As you have already noticed, we have a simple API working. And in order to launch it, you need to open the folder simple_api and execute the following command there:

Category: Programming
0

React Lessons. Lesson 12.

Hey all! Right now we will check up your home task and give you some valuable comments that will help you with your future work with React. To make it more convenient, you will need to see your code, so, switch to the respective commit and we will continue. Let us start with connect. We need connect to work with store. There is also another way: if you can transmit data using common props – do it! For example, in containers/Articles.js we refer to store in order to take out the needed articles from state:

Category: Programming
0

React Lessons. Lesson 11. Pt.2.

The simplest example of side-effects is Logging. Next we will create middleware that deals with Logging. Create a folder middlewares with a file logger.js inside:

Category: Programming
0

React Lessons. Lesson 11. Pt.1.

Our previous lesson was devoted to a more convenient way of how to write reducers using seamless APIs to add/remove elements and not to worry about any processes to be changed in between.

Category: Programming
0

React Lessons. Lesson 10.

So, let us now explore how we work with the data. We’ve used a denormalized structure for displaying our articles so far. You can see it in the file fixtures.js. Every article contains information about it, it really resembles a tree-like structure. This kind of structure is readable, but it will turn your life into hell, if you start to change the data.

Category: Programming
0

Sign in

Forgot password?

Or use a social network account

 

By Signing In \ Signing Up, you agree to our privacy policy

Password recovery

You can also try to

Or use a social network account

 

By Signing In \ Signing Up, you agree to our privacy policy