.js
§§ 1000
const express = require('express');
const app = express();
const port = 3000;
// Set up the server so that it can parse JSON requests.
app.use(express.json());
app.get('/', (req, res) => {
res.send({ hello: 'world' });
});
app.listen(port, () => console.log(`Listening on port ${port}`));
§§ FILE src/server.js
§§ 1000
const express = require('express'); // import the express library into our file and save it in a variable called express - this is a commonJS module system (not ES6 import) - this is how node works - we are importing something from node_modules folder - we are using the require keyword to import something from another file or library - the argument of the require function is the name of the library we want to import (in this case 'express') - we are saving it in a variable called express so that we can use it later on in our code - this is how node works and how you can use 3rd party libraries in your node projects // Set up the server so that it can parse JSON requests. app.use(express.json()); // create a route handler for the root route ('/') app.get('/', (req, res) => { res.send({ hello: 'world' }); }); // start our server on port 3000 app.listen(port, () => console.log(`Listening on port ${port}`)); // export our server so that we can use it in other files if needed module.exports = app; // now run `node src/server` in your terminal to start your server! // now you should be able to go to http://localhost:3000 and see your hello world message! // try adding more routes and logic to your server! have fun! :)
const app = express(); // create an instance of an Express application and save it in a variable called app - this will be used for all of our routes and logic for our application - Express is a web framework for Node that makes creating web servers easier by providing us with helpful methods like .get(), .post(), .put(), etc... which allow us to easily create routes and handle requests from clients const port = 3000; // set a constant called port which will be used when starting up our server later on
§§ COM2 update src/server2 file with more comments about what each line does - added comments about exporting our server so that we can use it in other files if needed - added comment about running `node src/server` to start the server and going to http://localhost:3000 to see the hello world message! - added comment about trying adding more routes and logic to your server! have fun :)
§§ --- dist/server2-dist/server2-dist/server2-dist/server2-dist/server2-dist/server2-dist/server2-dist/server2-dist/server2-dist/server2-dist/server2-dist/server2-dist/server2-dist/server2-dist/server2-dist/.tmp/.tmp/.tmp/.tmp/.tmp/.tmp/.tmp/.tmp/.tmp/.tmp/.tmp/.tmp/.tmp/.tmp/.tmp./src./src./src./src./src./src./src./src./src./src./src../../../../../../../../../..//..//..//..//..//..//..//..//..//..//..//..//..//..//..//..///////s////////s////////s////////s////////s////////s////////s////////s///////erver.jserver.jserver.jserver.jserver.jserver.jserver
Search
Powered by the People!
- FAVORITEN
- NEUIGKEITEN
- EXPLORE
- Seiten
- Gruppen
- Veranstaltungen
- Watch
- Blogs
- Marktplatz
- Angebote
- Jobs
- Foren
- Filme
- Spiele
Server url: https://togo.do/e/z/40gprz
Become a Contributor
- 0 AnteilePlease log in to like, share and comment!
- Business Observer for Sept. 6Business Observer for Sept. 6HTTP://WWW.FAYOBSERVER.COM/
Similar Pages
0 Tags 0 Anteile - Business Observer for Aug. 30Business Observer for Aug. 30HTTP://WWW.FAYOBSERVER.COM/
Similar Pages
0 Tags 0 Anteile - Observer Forum: Is the U.S. Postal Service getting the job done?What are your own thoughts on mail and package delivery in recent weeks and months?HTTP://WWW.FAYOBSERVER.COM/
Similar Pages
0 Tags 0 Anteile - Join the RepSneakers Discord Server!Check out the RepSneakers community on Discord - hang out with 32,788 other members and enjoy free voice and text chat.DISCORD.GG
1+ Similar Pages FoundSimilar Pages
Join the RepSneakers Discord Server!Check out the RepSneakers community on Discord - hang out with 32,787 other members and enjoy free voice and text chat.DISCORD.GG
0 Tags 0 Anteile - Server (computing)In computing, a server is a piece of computer hardware or software (computer program) that provides functionality for other programs or devices, called "clients". This architecture is called the client–server model. Servers can provide various functionalities, often called "services", such as sharing data or resources among multiple clients, or performing computation for a client. A single server can serve multiple clients, and a single client can use multiple servers. A client process may run on the same device or may connect over a network to a server on a different device. Typical servers are database servers, file servers, mail servers, print servers, web servers, game servers, and application servers.Client–server systems are usually most frequently implemented by (and often identified with) the request–response model: a client sends a request to the server, which performs some action and sends a response back to the client, typically with a result or acknowledgment. Designating a computer as "server-class hardware" implies that it is specialized for running servers on it. This often implies that it is more powerful and reliable than standard personal computers...EN.WIKIPEDIA.ORG
Similar Pages
0 Tags 0 Anteile - Dynamic web pageA server-side dynamic web page is a web page whose construction is controlled by an application server processing server-side scripts. In server-side scripting, parameters determine how the assembly of every new web page proceeds, and including the setting up of more client-side processing. A client-side dynamic web page processes the web page using JavaScript running in the browser as it loads. JavaScript can interact with the page via Document Object Model, or DOM, to query page state and modify it. Even though a web page can be dynamic on the client-side, it can still be hosted on a static hosting service such as GitHub Pages or Amazon S3 as long as there isn't any server-side code included. A dynamic web page is then reloaded by the user or by a computer program to change some variable content. The updating information could come from the server, or from changes made to that page's DOM. This may or may not truncate the browsing history or create a saved version to go back to, but a dynamic web page update using AJAX technologies will neither create a page to go back to, nor truncate the web browsing history forward of the displayed page. Using...EN.WIKIPEDIA.ORG
Similar Pages
0 Tags 0 Anteile - Ubuntu/Linux-Based Smart Home Panel for Private Server Integration - PortworldIn the modern age, home automation systems are no longer just about controlling lighting, heating, and entertainment. The smart home ecosystem is evolving, and the need for greater control, privacy, and integration with private servers is on the rise. One of the best ways to achieve this is by using an Ubuntu/Linux-based smart home panel, […]PORTWORLD-SOLU.COM
Similar Pages
0 Tags 0 Anteile - WebsiteA website (also written as a web site) is a collection of web pages and related content that is identified by a common domain name and published on at least one web server. Websites are typically dedicated to a particular topic or purpose, such as news, education, commerce, entertainment or social networking. Hyperlinking between web pages guides the navigation of the site, which often starts with a home page. As of May 2023, the top 5 most visited websites are Google Search, YouTube, Facebook, Twitter, and Instagram. All publicly accessible websites collectively constitute the World Wide Web. There are also private websites that can only be accessed on a private network, such as a company's internal website for its employees. Users can access websites on a range of devices, including desktops, laptops, tablets, and smartphones. The app used on these devices is called a web browser. Background The World Wide Web (WWW...EN.WIKIPEDIA.ORG
Similar Pages
120 Tags 0 Anteile - Cloud computingCloud computing is the on-demand availability of computer system resources, especially data storage (cloud storage) and computing power, without direct active management by the user. Large clouds often have functions distributed over multiple locations, each of which is a data center. Cloud computing relies on sharing of resources to achieve coherence and typically uses a pay-as-you-go model, which can help in reducing capital expenses but may also lead to unexpected operating expenses for users. Definition The United States National Institute of Standards and Technology's definition of cloud computing identifies "five essential characteristics": On-demand self-service. A consumer can unilaterally provision computing capabilities, such as server time and network storage, as needed automatically without requiring human interaction with each service provider. Broad network access. Capabilities are available over the network and accessed through standard mechanisms that promote use by heterogeneous thin or thick client platforms (e.g., mobile phones, tablets, laptops...EN.WIKIPEDIA.ORG
Similar Pages
22 Tags 0 Anteile - https://www.beaumontenterprise.com/news/article/Mammoth-central-found-at-Mexico-airport-15541598.php'Mammoth central' found at Mexico airport construction siteMEXICO CITY (AP) - The number of mammoth skeletons recovered at an airport construction site north of Mexico City has risen to at least 200, with a large number still to be excavated, experts said Thursday. Archaeologists hope the site that has become "mammoth central" - the shores of an ancient lakebed that both attracted and trapped mammoths in its marshy soil - may help solve the riddle of their extinction. Experts said that finds are still being made at the site, including signs that humans may have made tools from the bones of the lumbering animals that died somewhere between 10,000 and 20,000 years ago. There are so many mammoths at the site of the new Santa Lucia airport that observers have to accompany each bulldozer that digs into the soil to make sure work is halted when mammoth bones are uncovered. "We have about 200 mammoths, about 25 camels, five horses," said archaeologist Rubén Manzanilla López of the National Institute of Anthropology and History, referring to animals that went extinct in the Americas. The site is only about 12 miles (20 kilometers) from artificial pits, essentially shallow mammoth traps, that were dug by early inhabitants to trap and kill dozens of mammoths. Manzanilla López said evidence is beginning to emerge that suggests even if the mammoths at the airport possibly died natural deaths after becoming stuck in the mud of the ancient lake bed, their remains may have been carved up by humans, somewhat like those found at the mammoth-trap site in the hamlet of San Antonio Xahuento, in the nearby township of Tultepec. While tests are still being carried out on the mammoth bones to try to find possible butchering marks, archaeologists have found dozens of mammoth-bone tools - usually shafts used to hold tools or...HTTPS://WWW.BEAUMONTENTERPRISE.COM/
1+ Similar Pages FoundSimilar Pages
https://www.beaumontenterprise.com/news/article/Mammoth-central-found-at-Mexico-airport-15541598.php'Mammoth central' found at Mexico airport construction siteMEXICO CITY (AP) - The number of mammoth skeletons recovered at an airport construction site north of Mexico City has risen to at least 200, with a large number still to be excavated, experts said Thursday. Archaeologists hope the site that has become "mammoth central" - the shores of an ancient lakebed that both attracted and trapped mammoths in its marshy soil - may help solve the riddle of their extinction. Experts said that finds are still being made at the site, including signs that humans may have made tools from the bones of the lumbering animals that died somewhere between 10,000 and 20,000 years ago. There are so many mammoths at the site of the new Santa Lucia airport that observers have to accompany each bulldozer that digs into the soil to make sure work is halted when mammoth bones are uncovered. "We have about 200 mammoths, about 25 camels, five horses," said archaeologist Rubén Manzanilla López of the National Institute of Anthropology and History, referring to animals that went extinct in the Americas. The site is only about 12 miles (20 kilometers) from artificial pits, essentially shallow mammoth traps, that were dug by early inhabitants to trap and kill dozens of mammoths. Manzanilla López said evidence is beginning to emerge that suggests even if the mammoths at the airport possibly died natural deaths after becoming stuck in the mud of the ancient lake bed, their remains may have been carved up by humans, somewhat like those found at the mammoth-trap site in the hamlet of San Antonio Xahuento, in the nearby township of Tultepec. While tests are still being carried out on the mammoth bones to try to find possible butchering marks, archaeologists have found dozens of mammoth-bone tools - usually shafts used to hold tools or...HTTPS://WWW.BEAUMONTENTERPRISE.COM/
0 Tags 0 Anteile - We Try the Fletcher’s Corn Dog from Golden Chick’s Drive-ThruI’m stealing the fast-food beat from Observer contributor TC Fleming. And I’m breaking my personl stay-out-of-drive-thru rule. I’m breaking those rules because there’s an opportunity to get a proper corn dog any day of the week. It’s $5 at Golden Chick locations, and considering I don’t have to go to...HTTPS://WWW.DALLASOBSERVER.COM/
Similar Pages
0 Tags 0 Anteile