{"id":1102,"date":"2017-10-12T06:18:31","date_gmt":"2017-10-12T03:18:31","guid":{"rendered":"https:\/\/community.virtono.com\/?p=1102"},"modified":"2017-10-22T15:52:58","modified_gmt":"2017-10-22T12:52:58","slug":"express","status":"publish","type":"post","link":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/express\/","title":{"rendered":"express"},"content":{"rendered":"<header class=\"entry-header\">\n<h3 id=\"seriesName\">Series:\u00a0Introduction to the MEAN Stack<\/h3>\n<ul id=\"seriesList\">\n<li><a href=\"https:\/\/wp.me\/p7ISfL-hs\" target=\"_blank\" rel=\"noopener\">Part 1: Definition of the MEAN stack<\/a><\/li>\n<li><a href=\"https:\/\/wp.me\/p7ISfL-hz\" target=\"_blank\" rel=\"noopener\">Part 2:\u00a0Setup of the MEAN stack<\/a><\/li>\n<li><a href=\"https:\/\/wp.me\/p7ISfL-hC\" target=\"_blank\" rel=\"noopener\">Part 3:\u00a0Node.js<\/a><\/li>\n<li><a href=\"https:\/\/wp.me\/s7ISfL-npm\" target=\"_blank\" rel=\"noopener\">Part 4:\u00a0npm<\/a><\/li>\n<li><a href=\"https:\/\/wp.me\/s7ISfL-connect\" target=\"_blank\" rel=\"noopener\">Part 5:\u00a0Connect<\/a><\/li>\n<li><a href=\"https:\/\/wp.me\/s7ISfL-express\" target=\"_blank\" rel=\"noopener\">Part 6:\u00a0Express<\/a><\/li>\n<li><a href=\"https:\/\/wp.me\/s7ISfL-mongodb\" target=\"_blank\" rel=\"noopener\">Part 7:\u00a0MongoDB<\/a><\/li>\n<li><a href=\"https:\/\/wp.me\/s7ISfL-mongodb\" target=\"_blank\" rel=\"noopener\">Part 8:\u00a0Mongoose<\/a><\/li>\n<li><a href=\"https:\/\/wp.me\/s7ISfL-rest\" target=\"_blank\" rel=\"noopener\">Part 9:\u00a0REST<\/a><\/li>\n<li><a href=\"https:\/\/wp.me\/s7ISfL-baucis\" target=\"_blank\" rel=\"noopener\">Part 10:\u00a0Baucis<\/a><\/li>\n<li><a href=\"https:\/\/wp.me\/s7ISfL-bower\" target=\"_blank\" rel=\"noopener\">Part 11:\u00a0Bower<\/a><\/li>\n<li><a href=\"https:\/\/wp.me\/p7ISfL-i1\" target=\"_blank\" rel=\"noopener\">Part 12:\u00a0AngularJS<\/a><\/li>\n<li><a href=\"https:\/\/wp.me\/p7ISfL-i4\" target=\"_blank\" rel=\"noopener\">Part 13:\u00a0Restangular<\/a><\/li>\n<\/ul>\n<\/header>\n<div class=\"entry-content\">\n<p>Today I present to you the Framework\u00a0Express\u00a0, which is the most watched module at npm.\u00a0I also explain to you the concept of a route.<span id=\"more-3621\"><\/span><\/p>\n<p>Express relies on Connect and is also developed by TJ Holowaychuk.\u00a0It expands Connect with additional middleware and an API for\u00a0<strong>routing<\/strong>\u00a0.\u00a0In this case, the term routing is used to assign URLs (and HTTP methods) to a middleware.\u00a0Thus, different areas of a web page can use different middleware.\u00a0If a certain area of a website is to be password-protected, for example, a corresponding authentication medium can be used explicitly only for this area.<\/p>\n<p>The previous examples of the HTTP and file server are now combined with Express.\u00a0In a new project folder you must first install Express:<\/p>\n<div>\n<div class=\"codecolorer-container powershell default\">\n<table cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"line-numbers\">\n<div>1<\/div>\n<\/td>\n<td>\n<div class=\"powershell codecolorer\">$ npm install express<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>At the time of writing is the latest version of Express 3.4.0.\u00a0Here is the code for the server in a new file\u00a0<code class=\"codecolorer powershell default\"><span class=\"powershell\">server.js<\/span><\/code>:<\/p>\n<div>\n<div class=\"codecolorer-container javascript default\">\n<table cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"line-numbers\">\n<div>1<br \/>\n2<br \/>\n3<br \/>\n4<br \/>\n5<br \/>\n6<br \/>\n7<\/div>\n<\/td>\n<td>\n<div class=\"javascript codecolorer\"><span class=\"kw2\">var<\/span>\u00a0express\u00a0<span class=\"sy0\">=<\/span>\u00a0require\u00a0<span class=\"br0\">(\u00a0<\/span><span class=\"st0\">&#8216;express&#8217;\u00a0<\/span><span class=\"br0\">)\u00a0<\/span><span class=\"sy0\">;\u00a0<\/span><br \/>\nexpress\u00a0<span class=\"br0\">(\u00a0<\/span><span class=\"br0\">)<\/span><br \/>\n.\u00a0<span class=\"me1\">get\u00a0<\/span><span class=\"br0\">(\u00a0<\/span><span class=\"st0\">&#8216;\/&#8217;\u00a0<\/span><span class=\"sy0\">,\u00a0<\/span><span class=\"kw2\">function\u00a0<\/span><span class=\"br0\">(<\/span>\u00a0req\u00a0<span class=\"sy0\">,<\/span>\u00a0res\u00a0<span class=\"br0\">)\u00a0<\/span><span class=\"br0\">{<\/span><br \/>\nres.\u00a0<span class=\"me1\">send\u00a0<\/span><span class=\"br0\">(\u00a0<\/span><span class=\"st0\">&#8216;Hello World&#8217;\u00a0<\/span><span class=\"br0\">)\u00a0<\/span><span class=\"sy0\">;\u00a0<\/span><br \/>\n<span class=\"br0\">}\u00a0<\/span><span class=\"br0\">)<\/span><br \/>\n.\u00a0<span class=\"kw2\">use\u00a0<\/span><span class=\"br0\">(<\/span>\u00a0express.\u00a0<span class=\"me1\">static\u00a0<\/span><span class=\"br0\">(<\/span>\u00a0__dirname\u00a0<span class=\"br0\">)\u00a0<\/span><span class=\"br0\">)<\/span><br \/>\n.\u00a0<span class=\"me1\">listen\u00a0<\/span><span class=\"br0\">(\u00a0<\/span><span class=\"nu0\">1337\u00a0<\/span><span class=\"sy0\">,\u00a0<\/span><span class=\"st0\">&#8216;127.0.0.1&#8217;\u00a0<\/span><span class=\"br0\">)\u00a0<\/span><span class=\"sy0\">;<\/span><\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>The server code is almost identical to the example with Connect.\u00a0Express takes any middleware from Connect, so it\u00a0\u00a0can be used\u00a0\u00a0instead\u00a0.\u00a0New is the following section:<code class=\"codecolorer javascript default\"><span class=\"javascript\">express.<span class=\"me1\">static<\/span><\/span><\/code><code class=\"codecolorer javascript default\"><span class=\"javascript\">connect.<span class=\"me1\">static<\/span><\/span><\/code><\/p>\n<div>\n<div class=\"codecolorer-container javascript default\">\n<table cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"line-numbers\">\n<div>1<br \/>\n2<br \/>\n3<\/div>\n<\/td>\n<td>\n<div class=\"javascript codecolorer\">\u00a0 ,\u00a0<span class=\"me1\">get\u00a0<\/span><span class=\"br0\">(\u00a0<\/span><span class=\"st0\">&#8216;\/&#8217;\u00a0<\/span><span class=\"sy0\">,\u00a0<\/span><span class=\"kw2\">function\u00a0<\/span><span class=\"br0\">(<\/span>\u00a0req\u00a0<span class=\"sy0\">,<\/span>\u00a0res\u00a0<span class=\"br0\">)\u00a0<\/span><span class=\"br0\">{<\/span><br \/>\nres.\u00a0<span class=\"me1\">send\u00a0<\/span><span class=\"br0\">(\u00a0<\/span><span class=\"st0\">&#8216;HelloWorld&#8217;\u00a0<\/span><span class=\"br0\">)\u00a0<\/span><span class=\"sy0\">;\u00a0<\/span><br \/>\n<span class=\"br0\">}\u00a0<\/span><span class=\"br0\">)<\/span><\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>This section reminds you of the first code example with the\u00a0<code class=\"codecolorer javascript default\"><span class=\"javascript\">http<\/span><\/code>\u00a0module.\u00a0Only the function\u00a0<code class=\"codecolorer javascript default\"><span class=\"javascript\">get<\/span><\/code>\u00a0is new.\u00a0It is similar\u00a0<code class=\"codecolorer javascript default\"><span class=\"javascript\"><span class=\"kw2\">use<\/span><\/span><\/code>but takes a route as the first parameter in addition to the middleware as the second parameter.\u00a0In this case, the route is the URL of the root:\u00a0<code class=\"codecolorer javascript default\"><span class=\"javascript\"><span class=\"sy0\">\/<\/span><\/span><\/code>.\u00a0However, the route could be any string other than a URL or a regular expression.\u00a0This\u00a0<code class=\"codecolorer javascript default\"><span class=\"javascript\">get<\/span><\/code>\u00a0is the corresponding HTTP method, so this route and these middleware will only be performed on a\u00a0<code class=\"codecolorer powershell default\"><span class=\"powershell\">GET<\/span><\/code>request for the URL\u00a0<code class=\"codecolorer powershell default\"><span class=\"powershell\"><span class=\"sy0\">\/<\/span><\/span><\/code>\u00a0.\u00a0Similarly, there is for each HTTP method a corresponding function from Express to set specific routes and middleware for this:\u00a0,\u00a0, etc.<code class=\"codecolorer javascript default\"><span class=\"javascript\">express.<span class=\"me1\">post<\/span><\/span><\/code><code class=\"codecolorer javascript default\"><span class=\"javascript\">express.<span class=\"kw1\">delete<\/span><\/span><\/code><\/p>\n<p>If you\u00a0enter\u00a0http:\/\/127.0.0.1:1337\/\u00a0into the browser, you do not get the error message &#8220;Can not GET \/&#8221;, but a &#8220;Hello World&#8221;.\u00a0(Note: If you\u00a0<code class=\"codecolorer powershell default\"><span class=\"powershell\">GET<\/span><\/code>call\u00a0a URL through the browser, a\u00a0query\u00a0is always\u00a0performed\u00a0by default\u00a0.) However\u00a0, you can get the file\u00a0via\u00a0http:\/\/127.0.0.1:1337\/server.js<code class=\"codecolorer powershell default\"><span class=\"powershell\">server.js<\/span><\/code>\u00a0.<\/p>\n<p>But what if a route already\u00a0exists\u00a0for the URL\u00a0http:\/\/127.0.0.1:1337\/server.js\u00a0?\u00a0We can easily test this with a slightly modified example:<\/p>\n<div>\n<div class=\"codecolorer-container javascript default\">\n<table cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"line-numbers\">\n<div>1<br \/>\n2<br \/>\n3<br \/>\n4<br \/>\n5<br \/>\n6<br \/>\n7<br \/>\n8<br \/>\n9<br \/>\n10<\/div>\n<\/td>\n<td>\n<div class=\"javascript codecolorer\"><span class=\"kw2\">var<\/span>\u00a0express\u00a0<span class=\"sy0\">=<\/span>\u00a0require\u00a0<span class=\"br0\">(\u00a0<\/span><span class=\"st0\">&#8216;express&#8217;\u00a0<\/span><span class=\"br0\">)\u00a0<\/span><span class=\"sy0\">;\u00a0<\/span><br \/>\nexpress\u00a0<span class=\"br0\">(\u00a0<\/span><span class=\"br0\">)<\/span><br \/>\n.\u00a0<span class=\"me1\">get\u00a0<\/span><span class=\"br0\">(\u00a0<\/span><span class=\"st0\">&#8216;\/&#8217;\u00a0<\/span><span class=\"sy0\">,\u00a0<\/span><span class=\"kw2\">function\u00a0<\/span><span class=\"br0\">(<\/span>\u00a0req\u00a0<span class=\"sy0\">,<\/span>\u00a0res\u00a0<span class=\"br0\">)\u00a0<\/span><span class=\"br0\">{<\/span><br \/>\nres.\u00a0<span class=\"me1\">send\u00a0<\/span><span class=\"br0\">(\u00a0<\/span><span class=\"st0\">&#8216;Hello World&#8217;\u00a0<\/span><span class=\"br0\">)\u00a0<\/span><span class=\"sy0\">;\u00a0<\/span><br \/>\n<span class=\"br0\">}\u00a0<\/span><span class=\"br0\">)<\/span><br \/>\n.\u00a0<span class=\"me1\">get\u00a0<\/span><span class=\"br0\">(\u00a0<\/span><span class=\"st0\">&#8216;\/server.js&#8217;\u00a0<\/span><span class=\"sy0\">,\u00a0<\/span><span class=\"kw2\">function\u00a0<\/span><span class=\"br0\">(<\/span>\u00a0req\u00a0<span class=\"sy0\">,<\/span>\u00a0res\u00a0<span class=\"br0\">)\u00a0<\/span><span class=\"br0\">{<\/span><br \/>\nres.\u00a0<span class=\"me1\">send\u00a0<\/span><span class=\"br0\">(\u00a0<\/span><span class=\"st0\">&#8216;This should be the server.js!&#8217;\u00a0<\/span><span class=\"br0\">)\u00a0<\/span><span class=\"sy0\">;\u00a0<\/span><br \/>\n<span class=\"br0\">}\u00a0<\/span><span class=\"br0\">)<\/span><br \/>\n,\u00a0<span class=\"kw2\">use\u00a0<\/span><span class=\"br0\">(<\/span>\u00a0express.\u00a0<span class=\"me1\">static\u00a0<\/span><span class=\"br0\">(<\/span>\u00a0__dirname\u00a0<span class=\"br0\">)\u00a0<\/span><span class=\"br0\">)<\/span><br \/>\n.\u00a0<span class=\"me1\">listen\u00a0<\/span><span class=\"br0\">(\u00a0<\/span><span class=\"nu0\">1337\u00a0<\/span><span class=\"sy0\">,\u00a0<\/span><span class=\"st0\">&#8216;127.0.0.1&#8217;\u00a0<\/span><span class=\"br0\">)\u00a0<\/span><span class=\"sy0\">;<\/span><\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>If you now call\u00a0http:\/\/127.0.0.1:1337\/server.js\u00a0, you get the message &#8220;This should be the server.js!&#8221; Instead of the contents of the file\u00a0<code class=\"codecolorer powershell default\"><span class=\"powershell\">server.js<\/span><\/code>.\u00a0This is the order in which the middleware was set!\u00a0Our own middleware for the route\u00a0<code class=\"codecolorer powershell default\"><span class=\"powershell\"><span class=\"sy0\">\/<\/span>server.js<\/span><\/code>\u00a0was defined before the static file server and is therefore first executed.\u00a0It depends on the middleware whether subsequent middleware is still called or not.\u00a0In this case, we terminate with the method\u00a0\u00a0in our own middleware to call up additional middleware.\u00a0In this way, one could, for example, program an authentication medium that would block unauthenticated users and allow authenticated users to pass through static file servers.<code class=\"codecolorer javascript default\"><span class=\"javascript\">res.<span class=\"me1\">send<\/span><\/span><\/code><\/p>\n<p>An example of a real and complex website, which is based on Express, is\u00a0MySpace\u00a0.<\/p>\n<p>These basics are sufficient for the first walking tests in Node.\u00a0In the next article, I will first explain to you MongoDB.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Series:\u00a0Introduction to the MEAN Stack Part 1: Definition of the MEAN stack Part 2:\u00a0Setup of the MEAN stack Part 3:\u00a0Node.js Part 4:\u00a0npm Part 5:\u00a0Connect Part 6:\u00a0Express Part 7:\u00a0MongoDB Part 8:\u00a0Mongoose Part 9:\u00a0REST Part 10:\u00a0Baucis Part 11:\u00a0Bower Part 12:\u00a0AngularJS Part 13:\u00a0Restangular Today I present to you the Framework\u00a0Express\u00a0, which is the<\/p>\n","protected":false},"author":3,"featured_media":1103,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5,3],"tags":[],"class_list":["post-1102","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-knowledgebase","category-tutorial-how-to"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/zfY6lL7eFa-3000x3000.png?fit=465%2C141&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/s7ISfL-express","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":1082,"url":"https:\/\/www.virtono.com\/community\/knowledgebase\/definition-of-the-mean-stack\/","url_meta":{"origin":1102,"position":0},"title":"Definition of the MEAN stack","author":"Shreyash Sharma","date":"October 9, 2017","format":false,"excerpt":"Series:\u00a0Introduction to the MEAN Stack Part 1: Definition of the MEAN stack Part 2:\u00a0Setup of the MEAN stack Part 3:\u00a0Node.js Part 4:\u00a0npm Part 5:\u00a0Connect Part 6:\u00a0Express Part 7:\u00a0MongoDB Part 8:\u00a0Mongoose Part 9:\u00a0REST Part 10:\u00a0Baucis Part 11:\u00a0Bower Part 12:\u00a0AngularJS Part 13:\u00a0Restangular In a new article series, I would like to\u00a0offer\u00a0you an\u2026","rel":"","context":"In &quot;Knowledgebase&quot;","block_context":{"text":"Knowledgebase","link":"https:\/\/www.virtono.com\/community\/category\/knowledgebase\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/Mean.jpg?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/Mean.jpg?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/Mean.jpg?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/Mean.jpg?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/Mean.jpg?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":1089,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/setup-of-the-mean-stack\/","url_meta":{"origin":1102,"position":1},"title":"Setup of the MEAN stack","author":"Daniel Draga","date":"October 9, 2017","format":false,"excerpt":"Series:\u00a0Introduction to the MEAN Stack Part 1: Definition of the MEAN stack Part 2:\u00a0Setup of the MEAN stack Part 3:\u00a0Node.js Part 4:\u00a0npm Part 5:\u00a0Connect Part 6:\u00a0Express Part 7:\u00a0MongoDB Part 8:\u00a0Mongoose Part 9:\u00a0REST Part 10:\u00a0Baucis Part 11:\u00a0Bower Part 12:\u00a0AngularJS Part 13:\u00a0Restangular In this article, we will lay out the basics for\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/meanjs-1024x492.png?fit=1024%2C492&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/meanjs-1024x492.png?fit=1024%2C492&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/meanjs-1024x492.png?fit=1024%2C492&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/meanjs-1024x492.png?fit=1024%2C492&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1105,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/mongoose\/","url_meta":{"origin":1102,"position":2},"title":"Mongoose","author":"Shreyash Sharma","date":"October 12, 2017","format":false,"excerpt":"Series:\u00a0Introduction to the MEAN Stack Part 1: Definition of the MEAN stack Part 2:\u00a0Setup of the MEAN stack Part 3:\u00a0Node.js Part 4:\u00a0npm Part 5:\u00a0Connect Part 6:\u00a0Express Part 7:\u00a0MongoDB Part 8:\u00a0Mongoose Part 9:\u00a0REST Part 10:\u00a0Baucis Part 11:\u00a0Bower Part 12:\u00a0AngularJS Part 13:\u00a0Restangular Mongoose\u00a0is a framework which is based on the\u00a0native MongoDB driver\u00a0and\u2026","rel":"","context":"In &quot;Knowledgebase&quot;","block_context":{"text":"Knowledgebase","link":"https:\/\/www.virtono.com\/community\/category\/knowledgebase\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/mongoose.png?fit=370%2C200&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1111,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/baucis\/","url_meta":{"origin":1102,"position":3},"title":"baucis","author":"Shreyash Sharma","date":"October 14, 2017","format":false,"excerpt":"Series:\u00a0Introduction to the MEAN Stack Part 1: Definition of the MEAN stack Part 2:\u00a0Setup of the MEAN stack Part 3:\u00a0Node.js Part 4:\u00a0npm Part 5:\u00a0Connect Part 6:\u00a0Express Part 7:\u00a0MongoDB Part 8:\u00a0Mongoose Part 9:\u00a0REST Part 10:\u00a0Baucis Part 11:\u00a0Bower Part 12:\u00a0AngularJS Part 13:\u00a0Restangular In today's article, we practically apply our theoretical knowledge about\u2026","rel":"","context":"In &quot;Knowledgebase&quot;","block_context":{"text":"Knowledgebase","link":"https:\/\/www.virtono.com\/community\/category\/knowledgebase\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/opensouthcode-microservicios-sobre-mean-stack-15-638.jpg?fit=638%2C359&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/opensouthcode-microservicios-sobre-mean-stack-15-638.jpg?fit=638%2C359&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/opensouthcode-microservicios-sobre-mean-stack-15-638.jpg?fit=638%2C359&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3507,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-lemp-stack-linux-nginx-mysql-and-php-on-ubuntu-22-04\/","url_meta":{"origin":1102,"position":4},"title":"How to install LEMP stack (Linux, Nginx, MySQL, and PHP) on Ubuntu 22.04","author":"George B.","date":"June 20, 2023","format":false,"excerpt":"Introduction The LEMP stack is a popular software stack for web development and hosting. It includes four major components: Linux, Nginx, MySQL, and PHP. Each component serves a specific purpose in powering dynamic websites and web applications. Linux is the operating system that serves as the LEMP stack's foundation. In\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-install-LEMP-stack-Linux-Nginx-MySQL-PHP-on-Ubuntu-22-04.png?fit=600%2C330&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-install-LEMP-stack-Linux-Nginx-MySQL-PHP-on-Ubuntu-22-04.png?fit=600%2C330&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-install-LEMP-stack-Linux-Nginx-MySQL-PHP-on-Ubuntu-22-04.png?fit=600%2C330&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":1127,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/mongodb\/","url_meta":{"origin":1102,"position":5},"title":"MongoDB","author":"Shreyash Sharma","date":"October 17, 2017","format":false,"excerpt":"Series:\u00a0Introduction to the MEAN Stack Part 1: Definition of the MEAN stack Part 2:\u00a0Setup of the MEAN stack Part 3:\u00a0Node.js Part 4:\u00a0npm Part 5:\u00a0Connect Part 6:\u00a0Express Part 7:\u00a0MongoDB Part 8:\u00a0Mongoose Part 9:\u00a0REST Part 10:\u00a0Baucis Part 11:\u00a0Bower Part 12:\u00a0AngularJS Part 13:\u00a0Restangular So far our server has only returned static data: files\u2026","rel":"","context":"In &quot;Knowledgebase&quot;","block_context":{"text":"Knowledgebase","link":"https:\/\/www.virtono.com\/community\/category\/knowledgebase\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/mongodb-1.jpeg?fit=1040%2C560&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/mongodb-1.jpeg?fit=1040%2C560&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/mongodb-1.jpeg?fit=1040%2C560&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/mongodb-1.jpeg?fit=1040%2C560&ssl=1&resize=700%2C400 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/1102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/comments?post=1102"}],"version-history":[{"count":2,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/1102\/revisions"}],"predecessor-version":[{"id":1179,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/1102\/revisions\/1179"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media\/1103"}],"wp:attachment":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media?parent=1102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/categories?post=1102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/tags?post=1102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}