/wdg/ - Web Development General

I didn't see thread.
What's cheapest way to run a site with some sort of back end these days?

Attached: 1530481727020.png (1280x720, 1.06M)

Other urls found in this thread:

developer.mozilla.org/en-US/docs/Learn
freecodecamp.com
codecademy.com
hackr.io
developer.mozilla.org/en-US/docs/Web
github.com/kamranahmedse/developer-roadmap
youtube.com/watch?v=Zftx68K-1D4
jsfiddle.net
3v4l.org/
pastebin.com/gfBPg24A
laracasts.com/series/laravel-from-scratch-2017/episodes/18
stackoverflow.com/questions/18667326/no-route-matches-get-demo-hello
twitter.com/NSFWRedditGif

free tier on aws or similar. if you don't expect much traffic

Is storage free/cheap?

no sticky?

the fuck is this? delete thise bullshit

Op a fag

so is using node pointless unless i need a performance boost from easier asynchronous operations?
i started on a backend app using node, because the language didn't really matter.
but I did need some networking functions and I figured it would at least do that well.

but doing things synchronously is viewed as a "hack" in node... and dealing with all the async complications is a headache

i'm thinking of switching to python before this spirals out of control.

A 15 dollar a year vps on ramnode.

I use it for static websites.

how do i use modules in chrome extensions?
i have some code like
module.exports = (function(){ ... })();

that i can't figure out how to use in another js file. i've tried to use require.js, using the background.page field instead of background.scripts in the manifest, trying to use import statements, etc. but the whole things is errors all the way.

I think any script file listed under background scriprs in manifest will be loaded in same scope so you could jut replace module.exports with some top levle object name and reference it directly.

'Your body is full of leaks'

OP is a dumb nigger

Is there a JS library or something which provides a rolling week-by-week calendar for scheduling events like in pic so I don't have to learn how to write one up myself?

Attached: calendar.jpg (1807x393, 44K)

Is £10 ~ £15/h good for webdev? I'm mainly working fullstack with just vanilla JS +JQueer. It's a freelance job and I'm kind of afraid of stability issues. Since a busy month only nets me about 100 ~ 150 hours of work.
Are there more benefits to being tied to a salary?

here is the pasta for the thread:
Previous

>Free beginner resources to get started
Get a good understanding of HTML, CSS and JavaScript.
developer.mozilla.org/en-US/docs/Learn - a good introduction (independent of your browser choice)
freecodecamp.com
codecademy.com
hackr.io

>Further resources
developer.mozilla.org/en-US/docs/Web - excellent documentation for HTML, CSS & JS
github.com/kamranahmedse/developer-roadmap - Frontend+Backend learner-path suggestions
youtube.com/watch?v=Zftx68K-1D4

jsfiddle.net - Use this and post a link, if you need help with your HTML/CSS/JS
3v4l.org/ - Use this and post a link, if you need help with PHP/HackLang

>PHP resources
pastebin.com/gfBPg24A

>You accidentally learn a new vim command

Attached: 1534645463953.gif (450x253, 930K)

please someone tell me how they handle the issue of webpack in a "isomorphic" project
i've tried exporting a client and server config object in the same file, but it doesn't work right

Next time make a proper OP and ask your question on the next post, you full retard.

Does anyone have any experience with tweaking Laravel's built-in auth to user the username instead of email as the login field?

I am using the default Users migration that comes with Laravel but I didn't use the make-auth command, I just implemented the basics as per this tutorial:
laracasts.com/series/laravel-from-scratch-2017/episodes/18

I think S3 (Simple Storage Service) removed their free tier, but it's very cheap (a few cents per month) for light use. I also use DynamoDB (database), and I'm within the free tier for that. I'm not sure how cheap EC2 (service for actually running code) is, but like the others you pay for what you use, so I think it's pretty cheap for light use.

The issue with doing synchronous things in Node is that while that synchronous thing is happening (e.g. some filesystem API), no clients can be served. The threadis just sitting idle. But if you use the async version of that filesystem API, then instead of your thread just being idle, it can work on other requests. At scale, this matters a lot.

I don't know much about Python, so I don't know what its async story is for server-use.

Someone tell me what I'm doing wrong

PS: i did this based on random internet guides that were 3+ years old, I'm using the latest version of rails, so what im doing is probably outdated

Attached: wtf.jpg (1206x771, 116K)

Whats that website where they test your webdev skills and then find you a job?

Something like rocket or launch in the title..

there must be only 1 /wdg/

>ruby
m8...

This thread is several hours older than yours; fuck off PHP shill.

Is there anyway to detect how a user reached your site? like can I use google analytics to check the URL the user was currently on, and then block them based on that information?

nvm, I just wasn't searching for the right keyword. document.referrer works

I remembered it, launchcode

i want nene to review my code

There's also an HTTP header for this, so you can detect it on the backend.

good to know

you making some kind of honeytrap? interesting... how come?

Attached: index.png (225x225, 3K)

Retoasting
WebSocket testing keeps giving me 503 on my HAProxy, which I'm using to rerout the request like so:
frontend https-in
mode http
bind *:443 ssl crt
default_backend websockets
acl is_websocket path_beg /socket.io
acl is_websocket hdr(Upgrade) -i WebSocket
acl is_websocket hdr_beg(Host) -i wss
use_backend websockets if is_websocket

backend websockets
reqirep ^Host:\ .* Host:\ echo.websocket.org

Had to make a single-page website (with a few subpages) and didn't want to use a full-blown CMS with a database but instead gave lektor a try. Pretty good experience so far. Anyone else tried out some static file CMS?

I made a script that generates a website from textfiles using markdown to format the articles.

So comfy.

I run a research discussion forum. I try to promote thoughtful and unbiased discussion of the subject at hand. Every so often one of the pages gets posted on social media and a whole slew of people come to the page and shit up the discussion with their praise or hatred. They clearly don't read the paper and have no interest in the topic, so I just want to block people being redirected from those sites so that they give up and don't ruin it for my actual users

Cool wizardchan used to do (still do?) shit like that for any link coming from social media.

It's cute.

bump

>censorship

kys

I want to fill Nene’s holes

Cheapest way to hose 4TB of images?
How do chan archivers do it? Just run bare metel boxes in their basement?

is hating ruby a new meme

>new

Hi there.

Eclipse Php.

How to set eclipse to auto add brackets after typing if?

I'm used to discussing programming on Jow Forums, the place where employed developers hang out

Sincere advice, unless you're learning for a current job, or school you're wasting your time with ruby on rails.

It used to be great because it made web development trivial during it's prime. Now web development is trivial inherently.

MongoDB + Node.js + Express + Redis

Works for 99% of websites, and Node.js is not going anywhere, everyone is using it.

If you really just like Ruby Syntax...

Elixir/Crystal are the new "ruby on rails" languages, you're better off learning that.

Phoenix framework, and Amber, look em up.

>wasting your time
Only if i care about learning a particular framework, which I don't. I only care about the front-end dev experience, because I have zero of that. I'm only using ruby because there are other mature projects which I'm involved in that are written in Ruby.

if i step through the chrome debugger, innerText/textContent works as expected; however, if i just let things run, inner element text isn't changed.
wat do

stackoverflow.com/questions/18667326/no-route-matches-get-demo-hello

Lets say I have a function that returns a promise. Then within that function I attach a callback to some element in the DOM. That callback also returns a promise. How do I get that promise from the callback to the containing promise?

The code has been changed as to not disclose any secrets.
function promptForX() {
return new Promise((resolve, reject) => {
// displayAlert attaches the callback to a close button on the alert
displayAlert('#foo', function () {
var bar = $('#baz').val();
return returnsAPromise(bar).then(function () {
hideAlerts();
return bar;
});
});
});
}

I think you want something like this:
function promptForX() {
return new Promise((resolve, reject) => {
// displayAlert attaches the callback to a close button on the alert
displayAlert('#foo', function () {
var bar = $('#baz').val();
returnsAPromise(bar).then(function() { // I don't think you need to return this
hideAlerts();
resolve(bar); // this passes bar to the callback in the .then() of promptForX's promise
}).catch(function(err) {
reject(err); // if returnsAPromise rejects, promptForX should reject too
});
});
});
}

wtf man, we can't have 2 wdg threads someone should delete one

async function promptForX() {
await { then(resolve) { displayAlert('#foo', resolve); } };
const bar = $('#baz').val();
await returnsAPromise(bar);
hideAlerts();
return bar;
}

Should i really use passportJS? what adventage it gaves me?

Register:
>Get form info
>Save it in DB hashing the password

Login:
>Search email on db
>Get info
>Compare passwords
>Passwords are okay, create a new express-session
>user is logged

I made that just using express-session and mongoose, why should i use passportjs? it has security things i don't know about? or the magic of it comes when i try to use fb/google/github strategies?

Attached: 1_bBUaeg9VW2wWBydgmmBH-g.png (1600x856, 87K)

all you need is
node
express
jquery
anything else is bloat for gay hipster cucks

Not that guy but i go there sometimes and there is never any discussion. I once got hired from there to make a site though.

Web development thread?

I'm a wordpress dev, can I post here?

yes, expect
>wordpress
though