thatrest.blogg.se

Plancke io
Plancke io







However this is a more advanced tool, you shouldn't need this if you're just learning about web dev.Ĭan you ask a more specific question, maybe? The last paragraph of the post you're responding to touches on this briefly. node-fetch is typically a Node.js library, and all the API data is fetched by the server and inserted into the HTML before it's sent to the browser anyway.ī) That URL seems like not the right URL to use.įor some libraries which aren't available through a URL like that (e.g., they're only available through npm), you need to use something like browserify to convert them. In general, that is the way you'd import external libraries, yes, however:Ī) Plancke.io doesn't need to use node-fetch. Skip here if you feel comfortable with JavaScript programming within the browser/forms for user input, AND you don't want to learn about the best practices and tools available to you (I advise you at the very least skim those sections): Skip here if you feel comfortable styling your web pages using CSS: Skip here if you feel comfortable creating HTML files/web basics: MDN docs are by far the best docs on the web for teaching yourself web development (better than any paid courses I've seen) You should also read documentation on how the web works, starting with basic knowledge of HTML and HTTP (if you don't know them already), and then move on to dynamic web pages which generate HTML (what you're looking to do), instead of serving raw. If you don't know what to ask, at least share what programming language you want to work with. When an user requests their stats, you get the template, and replace the placeholders with actual values. Of course, this is a template so you can't put actual kill counts or stuff, instead you put a placeholder for it (i.e "BW Kills : $") You make a template of what a response for player stats should look like. There are multiple ways but I'll explain the simplest and the most common : The other question is about how they translate a raw api response to formatted content. Whatever you respond depends solely on your code. When a request is sent to your server, it is entirely yours to play with. The only thing you only need to configure with your domain registrar are dns records (which is basically what dns servers use to "translate" a hostname into an IP). I also saw something about register that I didn't rly get, but : The server can then extract the player_name part and return dynamic content, all based on a part of the url. The URL, uniform resource locator, just points to whatever resource the client wants. When the server receives this, they can process this whatever way they want. The client's browser gets the IP from the hostname part of the URL by using a dns, and then it sends a request to the result IP saying hey i want to GET this page, its called uh " ". (I am going to exclude lower level mechanics like SSL handshake, syn-ack because it's not the point here). even then, it is only that way because it is programmed to do so. 1st of all, you need to understand that an URL path doesn't have to work like a filepath.Ī traditional file path specifies the route you should take to reach a specific file from root, i.e /home/chiefchippy2/index.htmlĪn URL path can also work like that, but usually only for static resources in a specific folder.









Plancke io