Hey, guys! Let's continue our lesson about Express basics and Middleware. The result is (add to app.js):
All of our candidates go through a rigorous 3-stage selection process:
All of our candidates go through a rigorous 3-stage selection process:
Hey, guys! Let's continue our lesson about Express basics and Middleware. The result is (add to app.js):
Hey all! This and next articles will be devoted to various themes on development within the context of one app that we will consequently improve. This app is a web chat.
Hey all! The first topic of this article is transferring of parameters and the script for Node.js. To show you the principle, we will create a file with a simple code, so add it (server.js):
We are looking forward to meeting you on our website soshace.com
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.
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:
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
We are looking forward to meeting you on our website soshace.com
Всем привет! Продолжаем работу над нашим приложением. Мы с Вами уже умеем делать простые обращения к серверу и в 80% случаев этих знаний будет достаточно для выполнения типовых задач. Но конечно же, как работать с более сложными вещами мы тоже разберемся. Но прежде чем начать с этим разбираться спешу Вас предупредить, что middleware далеко не всегда надо писать самостоятельно. Т.r. это такие часто используемые (переиспользуемые) элементы, которые уже были написаны до Вас. Рекомендуем ознакомиться с данным ресурсом, здесь можно найти огромное количество разнообразных middlewares и т.д. К примеру вот готовый logger. Мы писали с Вами logger чтобы попрактиковаться, но вот пример прекрасного готового решения.
"Уважаемы читатели! Не забудьте про первую часть этой статьи, новичкам стоит начать с Урока 1." Теперь давайте это вызовем в containers/Articles.js , добавив такую запись вызывая action creater: