/wdg/ - Web Development General

the OP image shows jQuery code edition

>Getting started
Get a good understanding of HTML, CSS and JavaScript.
MDN web docs offer a good intro (independent of your browser choice)
developer.mozilla.org/en-US/docs/Learn

>Free online courses
codecademy.com/
freecodecamp.com/
coderbyte.com/
bento.io/

>Next
youtube.com/watch?v=sBzRwzY7G-k
github.com/kamranahmedse/developer-roadmap

>Useful resources
developer.mozilla.org/en-US/docs/Web - General documentation for HTML, CSS & JavaScript
stackoverflow.com/ - Developers asking questions and helping each other
caniuse.com/ - Check browser support for front-end web technologies

>Useful Youtube channels
youtube.com/user/TechGuyWeb - Traversy Media
youtube.com/channel/UC8butISFwT-Wl7EV0hUK0BQ - freeCodeCamp
youtube.com/channel/UCO1cgjhGzsSYb1rsB4bFe4Q - funfunfunction
youtube.com/learncodeacademy - codecademy
youtube.com/derekbanas

>in-depth comparison of VPS hosts
webstack.de/blog/e/cloud-hosting-provider-comparison-2017/

Other urls found in this thread:

developer.mozilla.org/en-US/docs/Learn/Server-side/Express_Nodejs/mongoose#Mongoose_primer
us.api.battle.net/wow/leaderboard/3v3?locale=en_US&apikey=private',
us.api.battle.net/wow/leaderboard/3v3?locale=en_US&apikey=private'
en.wikipedia.org/wiki/Currying
twitter.com/NSFWRedditImage

Redpill me on Mongoose and MongoDB

MongoDB is better than MySQL

Redpill me on Meteor.js

It's good. Use it.

I will now share a set of names I have thought of for Javascript libraries:

Unicorn.js
Redpill.js
BrickABrack
NoJS
Lampshade
Clamshell
Headgear
Fridge
Computer
Window

Pajeet.js

redpill me on HTML

It's shit, don't bother with it. Can't make Wordpress with it or nothin

I've read this guide on Mongoose and MongoDB. The tutorial uses a cloud-based database whereas I want to set up a local one instead. The instructions it gives to me is simply this:
Note: If you prefer you can set up a MongoDb database locally by downloading and installing the appropriate binaries for your system. The rest of the instructions in this article would be similar, except for the database URL you would specify when connecting.


Can anyone help me make sense of what I have to do in clearer terms? Maybe provide me a step by step.

The article I'm referring to: developer.mozilla.org/en-US/docs/Learn/Server-side/Express_Nodejs/mongoose#Mongoose_primer

Go download and install mongodb for your operating system. When referring to the database, the url will be localhost or 127.0.0.1 or something.

are you one of these idiot bootcamp boys I've been hearing so much about?

What was the point of the second part of your post? Keep your personal problems to yourself.

wow wdg is really a peace of shit

Sorry to upset you sir, I just thought that maybe an emotionally intelligent adult such as yourself might be able to download and install software without reaching out to Sup Forums for help.

Anyway you didn't really help me out much.
>the url will be localhost or 127.0.0.1 or something.
Can you provide something more specific? How does it work? Why is my localhost the reference to my database?

>wow wdg is really a peace of shit
>peace of shit
>peace
Quality man right here.

What do you guys think about Laravel?

So asking for help is against your own terms? You're not making much sense.

wdg is thread of peace and Stallman is its prophet

It's morning in Europe, Americans are asleep, we were just shitposting to get the thread moving.

In your example, the mongodb server is hosted remotely (mlab, for example), so you connect to that remote db by using it's URI ex:

"uri": "mongodb://:@xxxx.mlab.com:21182/"

In the case you want to host your db yourself, you will be having to point mongoose to your local pc (localhost) or (127.0.0.1) where you will be hosting the mongodb server:

"uri": "mongodb://:@127.0.0.1: 27017/"

So you need to install the mongodb package, install it, en configure user, password, port and db.

Assuming the rest of the code is correct, why doesn't this update work? Have created the objects before and assigned the properties.

collection.update(query, {$set: plupdate}, {$set: update}

ok

127.0.0.1 is what's known as a loopback ip address, which refers to your own computer.
You could even say it loops back!

localhost is a machine-specific dns record, pointing to 127.0.0.1

DNS or Domain Name system is a world wide web system which stores names and IP addresses. It helps us get around the internet without plugging in IP addresses.

When you install MongoDB and you need a URL (Universal Resource Locator!) to refer to it, you can refer to
1. Your machine with localhost or 127.0.0.1
2. Your MongoDB via a secondary number, known as a port number

the url may in the end look something like this!
> localhost:27017

Let me know if you have any more questions you fucking moron. Please end your life I seriously hope you did not "graduate" whatever "Educational Institution" you "attended" without finding out what an IP address or DNS record is.

Which is faster, getElementByClassName() or querySelectorAll()?

>Let me know if you have any more questions you fucking moron. Please end your life I seriously hope you did not "graduate" whatever "Educational Institution" you "attended" without finding out what an IP address or DNS record is.

Day #2 of my comfy alt-coin trading bot. Working on the ui. Just finished implementing some dank candle graphs.

Rate and hate :^)

sexy as it is

>Let me know if you have any more questions you fucking moron. Please end your life I seriously hope you did not "graduate" whatever "Educational Institution" you "attended" without finding out what an IP address or DNS record is.
I forget sometimes that /wdg/ is on Sup Forums since I have a bookmarklet for it in my webdev bookmarks folder which means I never need to browse any other part of the site. I hope that you get through whatever is troubling you, kid

ur a dum ha hah a

Referring to Mongoose. Are schemas/models essentially blueprints to derive instances from?

thanks desu

How do I append multiple elements in Javascript?
function buildQuiz() {
firstq.textContent = question1.question;
list.appendChild(listitem).innerHTML = question1.answers.a;
list.appendChild(listitem).innerHTML = question1.answers.b;
}

Building a quiz and would like to have four answers appended to each question. I would like to retain the innerHTML property since I will be adding checkboxes. Any thoughts, /wdg/?

The UI has a sort of harsh business-vibe to it as is. If you're going to use Windows and write your application's UI as a webapp, you may as well keep the harsh business-vibe.

Forgot to add that my issue at the moment is the latter appendChild replacing the first one, so the string from answers.b shows up instead of answers.a.

node.js core dumps why
I'm not smart enough to debug this shit

why not go to jsperf and try it out

appendChild just moves the element. So by appending twice you are moving the element into the list, then out of the list and back into the list.

Follow up, you could do it like this.

var list = document.getElementById('list'),
answers = ['op', 'is', 'a', 'faggot'];

answers.forEach(function(answer){
var elem = document.createElement('div');
elem.innerHTML= answer;
list.appendChild(elem);
})

>Let me know if you have any more questions you fucking moron. Please end your life I seriously hope you did not "graduate" whatever "Educational Institution" you "attended" without finding out what an IP address or DNS record is.

You're the fucking moron here, for not knowing that /wdg/ is 90% self-taught neets trying to catch their first break. Yeah, not all of us knew what a DNS record was before we started programming.

Not him, but my first words as a baby were "DNS"

No closing paren

except that he's right, if you're trying to webdev without knowing what a web is you might need to catch up on your reading

What do you think about GraphQL?

don't drag us self-taught neets into your ignorant mess desu

That was a good explanation, but jesus dude, get off your high horse.

That attitude will keep you back in your career. No one wants to hire a cancerous asshole who makes people feel stupid for asking honest questions. The question user was asking was a good question and isn't an easy one to google if you don't know where to start. It's one thing to shout people down for asking questions they can easily find answers for, but this is the kind of question that one should ask a human.

Ignorance is a temporary problem that goes away as soon as a person asks for and receives a answer. You can keep people around you ignorant by discouraging them from asking questions, but that doesn't make you smarter. It lowers the level of everyone around you and makes you dumb, which (unlike ignorance) is often a terminal affliction.

Assuming you're new to the tech job market, get your shit together before it's too late. You really don't want to be known as the brilliant asshole who brings down the overall level of whatever team you join.

>loser goes on Sup Forums to rant about how others should behave because he clearly has a career worth imitating
what's troubling you babe?

How is your career going?

>projecting

So I'm learning how to use express js. I read the MDN tutorial on it and now I'm trying to replicate the instructions, but on my own project. I chose to utilize the express application generator. I'm also trying to use the Blizzard API for some data I'd like to use on my website. My question is do I treat the url that I'm given from the API site and simply paste it onto a get method formed on my routes directory?

So would my code look like this
var express = require('express);
var router = express.Router();

router.get('us.api.battle.net/wow/leaderboard/3v3?locale=en_US&apikey=private', controller.randomFunction);


I'm really trying to make sense of all this but it seems like I'm turning out to be a slow learner. No bully plz.

just try calling the api and see if this works
for requests about user data you might need to authenticate with oauth

Pretty great, passed the 5k/mo milestone in june!

I can't just yet. I need to configure some view files that I'm still confused about because they're created using the pug template engine. So I can't really set up the template to preview all the data and I'm not too versed in finding out in another way.

just paste url in your browser, use curl or postman

I'm at 2-3K :(

What kind of stuff do you do?

>pretty great
>5k/mo

The url works fine by itself. I was previously using the xmlhttprequest and just using regular javascript to call the api. Now I'm trying to move on to express js and wondering if instead of using the xml module I was using before, if the new way is the
router.get('url', callback function);

way

I'm trying my hardest to be clear.

No you're an utter disgrace for anybody here. If you're not able to browse to a website and download software you should fucking end yourself or consider as you new home board.

It's not my full time job... yet.

You'll keep growing don't fret! Right now I do two things, a saas targeting apartment owners, and vidya sites - the latter doesn't make as much but it's hobby fulfillment basically.

You know what you and the Reddit community have in common? You're both pretentious and immature snobs.

Looks good.

>tfw have about 30k WAVES from ICO pending approval to be sent to me

I've been waiting a week.

5k a month isn't bad at all.

You must live in a city or something where you get nickel and dimed to death.

Average household income where I'm at is 36k. I make 62k. I live basically like a king here. Even gas is under 2 dollars. My rent is only 915 for a place you would pay 3500 a month for in a city.

idgaf

I have both tabs open.

btw, what's a good subreddit that will help me with learning express and mongoose and mongodb and all that? All that in one?

I'm starting all over again. I need ideas for a website I can create that I can also appropriately jot down on my resume for an internship. I want to build this website using node.js and mongodb. Fork those ideas over.

Guys, I am new to this whole wordpress thing, got a sideproject suddenly. Is buying a kewl wp theme a good route? Do they charge monthly?

depends on how much money and time you're willing to spend on this
i have lots of free time and no moneyz so i usually just take an existing free theme, customize it through ui and then slightly edit theme files if i need further customization

if you have some moneyz but no time just buy a good looking theme

if you have more time and basic design skills you could try making your own theme

Or just make your own damn website

You don't even need to use jquery or any meme framework

Not my money, I can easily get another $50 from the client for the theme, so. This is a one time purchase right?

Eh, I am not that into webdev or design

Using crystal and-
"#{{{File.real_path(filename)|}}}/#{{{filename}}}.cr"
really nigga?

>This is a one time purchase right?
should be
this should be mentionned on theme shop site or designer's site, look it up

Ok, thanks faam

ever strike you that people may act differently in a professional situation

if not even reddit is enough of a hugbox for you maybe you should try to pick up an obscure gender identity and fight the gender gap between men and trans-fats on tumblr?

hey fellas,
i wanna match my dev environment with production with vargant/docker/packer/linuxkit combo to harness immutable server pattern. so each time i wanna push updates - i build & deploy new server images and kill the old ones. anyone using the same or similar setup? will i live a happy life?

Edit: why the downvotes?
Edit: thanks for the gold

What do I do for oauth_body_hash?

I can't find anything on the web.

>pajeets not using only wordpress.
you mean pajeet.php.

its a frontend framework for pajeets lol... it will be something like jquery, but with more chained methods..

How can I get google to index 100 million pages of my website? I submitted a sitemap but the bot stopped around 4 million.

>Been using JavaEE and Ruby on Rails since college
>Node.js explodes into the scene
>Try to learn it every couple of months but give up every time because the syntax is ugly as fuck, tutorials are scarce, and I get confused about which javascript code is back-end or front-end

>suddenly ceo appears
>"hey boys you can node.js, right?"
>we sit in silence
fuck
I really need to get to that shit soon

doesn't look complex desu, just kind of a clusterfuck due to the availability of many different tools fulfilling the same purposes

nice for prototypes
pain in the everything to scale past 10-ish concurrent users

>syntax is ugly as fuck
whats bad about JS syntax compared to the other languages you are used to?
>which javascript code is back-end or front-end
If it's executed on the server it's backend code.
What's the cause for confusion here?

>tfw I have all these great programming PDFs I've read but can't display them on my bookshelf

Do any of you have an auxiliary monitor to display your ebooks?

buy a printer desu

bought shitty old 19'' for that purpose, ye

eink reader helps a ton, sometimes I print some pdfs provided I can freely use office printer

So, you either need to use the built in http module, or the request module (makes it easier). You're code should look something like this

app.get('/', (req, res, next) => {
axios.get('blizzardApi.url')
.then(data => res.json(data))
})


essentially, you should be calling the api request inside the express route

var express = require('express');
var request = require('request');

var app = express();

app.get('wewlad', (req, res, next) => {
request({
method: 'get',
uri: 'us.api.battle.net/wow/leaderboard/3v3?locale=en_US&apikey=private'
}, (err, res, body) => {
try {
res.json(JSON.parse(body));
}catch(e){
res.end(500);
}
});
});

app.listen(3000);


i like ur semen demon

what is that color scheme and is there an android studio version and kotlin

>hate websites that don't work without javascript
>tempted to make a website that doesn't work without javascript

I hate this world

My goal in life is to get a JS dev job so I can make a framework called curry.js, which is not overtly anti-pajeet but is still funny.

Also, why are there so many different frameworks?

curry/currying has a context in programming, so won't be funny
en.wikipedia.org/wiki/Currying

Congratulations, you've discovered that making modern websites without relying on technologies like JS is impossible. Hopefully now you can stop moaning about sites that use JS.

Still working on the loan app

Boss gave me a nice screen for free :)

sys.Sup Forums.org/tv/post

nice REST you got here

Socket.io?

What would be better for a polling/survey type webapp, relational or non relational database?

Should I just go ahead and learn jQuery since a lot of people use it? Or should I stick to my guns and not learn any external libraries unless it is absolutely necessary, e.g. node.js?

jquerry used to be the shit, especially since it helps you support old brosers
now there's a bazillion of js libs and frameworks, you should learn one of these frameworks instead and use it for bigger projects while still not using external stuff for small projects