[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/wdg/ - Web Development General

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 147
Thread images: 11

File: wdg1.png (868KB, 822x552px) Image search: [Google]
wdg1.png
868KB, 822x552px
Russia #1 Ally Edition

> Discord
https://discord.gg/wdg
OR
https://discord.gg/0qLTzz5potDFXfdT
(they're the same)

>IRC Channel
#/g/wdg @ irc.rizon.net
Web client: https://www.rizon.net/chat

>Learning material
https://www.codecademy.com/
https://www.bento.io/
https://programming-motherfucker.com/
https://github.com/vhf/free-programming-books/blob/master/free-programming-books.md
https://www.theodinproject.com/
https://www.freecodecamp.com/
http://www.w3schools.com/
https://developer.mozilla.org/
http://www.codewars.com/
[YouTube] Crockford on JavaScript - Volume 1: The Early Years lecture series.

>Frontend development
https://github.com/dypsilon/frontend-dev-bookmarks

>Backend development
https://en.m.wikipedia.org/wiki/Comparison_of_web_application_frameworks
backendDevelopmentBookmarks.md

>Useful tools
https://pastebin.com/q5nB1Npt/ (embed)
https://libraries.io/ - Discover new open source libraries, modules and frameworks and keep track of ones you depend upon.
https://developer.mozilla.org/en-US/docs/Web - Guides for HTML, CSS, JS, Web APIs & more.
http://www.programmableweb.com/ - List of public APIs

>NEET guide to web dev employment
https://pastebin.com/4YeJAUbT/ (embed)
>How to get started
[YouTube] WATCH THIS IF YOU WANT TO BECOME A WEB DEVELOPER! - Web Development Career advice - "WATCH THIS IF YOU WANT TO BECOME A WEB DEVELOPER! - Web Development Career advice"
[YouTube] Javascript is Easy - "JavaScript is Easy" - If you can't into programming, you probably won't find a simpler introduction to JavaScript than this.


>cheap vps hosting in most western locations
https://lowendbox.com
https://www.digitalocean.com/
https://www.linode.com/
https://www.heroku.com/
https://www.leaseweb.com
https://www.openshift.com/
https://scaleway.com/
>>
File: 1416852085957.png (193KB, 637x517px) Image search: [Google]
1416852085957.png
193KB, 637x517px
1st for w-we're all gonna make it...
>>
Is Flask any good?
>>
I'm about to take the Node.JS class on Codeschool.

Is this a waste of time?

Opinions on Node for the backend?

>have several angular2 projects under my belt but using asp.net backend. (full stack)
>>
>>55840354
Is developing the front end from scratch and some of the backend logic + setting up and running a WordPress site good enough skills to get hired as junior on minimum field-range wage ?
>>
>>55840469
Yes assuming they are actively seeking this position and you can demonstrate your work is decent.

They wont drop everything to hire you however.
>>
>>55840460
wow I'm an idiot.

Just started and found out its not meant to be a web framework.

>inb4 not your blog
>>
Should jump the gun and just learn Typescript?
>>
Gonna start leaning HTML and then move on to ASP.net, wish me luck bros.
>>
What IDE do you guys recommend for a newcomer to web development? I'm currently looking at NetBeans.
>>
>>55841205
brackets
>>
>>55841143
HTML is simple, but you should never use it by itself. Before moving on to ASP.NET, you should learn CSS too so that your pages don't look like shit.
>>
Yo, /wdg/,
is there a simple way to redefine the default html colors?
Like blue being #0000FF and changing it to #268BD2
>>
>>55841143
>>55841251
I second this. Plus css is pretty easy.
>>
>>55841251
>learn CSS too so that your pages don't look like shit

Technically, loads of people learn CSS and their pages still look like shit. If he's focusing on backend then leave him be because that's not a priority, let the front end oriented people worry about how the pages look.
>>
>>55840460
Just torrent the content
>>
File: raspilamp.jpg (970KB, 2448x2448px) Image search: [Google]
raspilamp.jpg
970KB, 2448x2448px
Hi gais,

how to get the argument from $.ajax call ?
I want to send a variable 'id', to update.php, which is to run a mysql query where id = id.
function openWin(id)
{
var newWindow = window.open("\img/"+id+".jpg" ,"", "width=300,heigth=400");

console.log("Attempting to open: " + id + ".jpg");

$.ajax({
type: "POST",
url: "update.php",
data: {id : this.id}, //here i tried many
success: function(){console.log(id +"++ sent!")}
});
}

update.php:
    //$_POST['id'];

if(isset($_POST['id']))
{
$id = $_POST['id'];
echo "id is " + $id;
}


but I get a
Notice: Undefined variable: id
when I try using it later.
>>
I'm trying to make a site where you enter a salary and a table is generated that contains a list of jobs whose average salary is around the entered number. How do I even start, after the basic HTML/CSS/JS?
>>
File: raspiwifidrive.jpg (1MB, 2393x2393px) Image search: [Google]
raspiwifidrive.jpg
1MB, 2393x2393px
>>55842264
And just thought about the logic - would it be a good practice to use the callback function to change the value of the updated field in the html ? on just refresh and rely strictly on the db info.
>>
>>55842336
you will need a backend with some db, i think.
So php+mysql ? download xampp/wamp and play around with connecting and displaying a db, and this will fall into place
>>
>>55842264
$.ajax({
url: "myurl.com",
type: "POST",
data: { id: 2 },
success: function(data) { console.log(data); }
});
>>
Phonegap actually sucks fucking donkey dick and balls senpai.
>>
>>55842402
thx, but still:

Notice: Undefined variable: id on line 29

which is in the query, trying to use the $id = $_POST['id'];
>>
>>55840435
Yeah it's good for stuff that aren't very database dependant.
>>
>>55842350
You could get some 90° short cables and really neaten up that setup. Also a small dongle would help
>>
>>55842528
are you sure this.id is defined before you post it?
>>
>>55842607
good, point.
defined it as global in the beginning, and the errors are gone, just a 'connected' for the db. But the query still doesn't work, or the echoing the incoming id. should I post my whole update.php code ?
>>
>>55842605
thx, just saved the pic
>>
>>55842680
i'm not a php guy, i'm a c# .net guy

sorry
>>
>>55842528
That means the isset() returned false...
>>
>>55842814
yes, i know. I'm not getting any data into it.
>>
Has anyone seen a decent source for learning how to do Isomorphic React?
>>
>>55842903
>>55842814
yupe, no matter what I do, I constantly get an undefined index $_POST["id"].
Vardump returns:
array(1) {
["id"]=>
string(1) "2"
}
so supposedly there has to be something inside.
>>
>>55843608
Just show us your code. Pastebin or something.
>>
>>55843608
The Ajax is definitely the problem. Try setting it like this or something, this is how I usually do Ajax.

$.ajax({
url: "process.php",
data: data,
processData: false,
contentType: false,
type: "POST",
success: function(result){
//whatever
}
});
>>
Is web development an "in demand" career? I don't have an interest but people seem to think is be good at it.

>Hey Jonny, this kids got some computa skills!
>>
File: linkedin profile pic.jpg (22KB, 386x386px) Image search: [Google]
linkedin profile pic.jpg
22KB, 386x386px
thx for the input, guys
>>55843662
main part: http://pastebin.com/stkj0yzx

the called php: http://pastebin.com/C2kj1r4Q

>>55843684
contentType and processData make the vardump return empty array.
>>
>>55843744
so the main part lists a table of names / id / count from mysql, then has to open a picture onclick from /img/id+.jpg and do a count++ in the mysql in the second php file. there might be a lot of junk code because of all the things i tried.
>>
>>55841486
.blue {
color: #26....
}
<p class="blue">this text is blue</p>
>>
>>55840354
daily reminder that web """""dev""""" is not real dev

enjoy your "coding", kiddies
>>
>>55843744
one eye looking forward, another eye looking left

and no, i'm not talking about the shirt either lmao
>>
>>55843933
hey bro your keyboard is intermittently broken.
>>
What's the correct http code to return if there's a missing field in a form? 400? What about not being logged? 401?
>>
>>55843933
t-thanks, you too...
>>
>>55843744
PHP doesn't have global keyword, you don't actually assign $id variable and mysql is deprecated, for good reason.
>>
>>55844048
There is bad request and access forbidden codes.
>>
>>55844083
400 and 401 look good.
>>
>>55844063
there's no $id, because I can't access the $_POST['id'] for some reason, thanks your input tho, mysql is the latter part.
>>
File: permalink-settings.png (206KB, 1462x1142px) Image search: [Google]
permalink-settings.png
206KB, 1462x1142px
Hi

I have a problem with permalinks in wordpress. I recently moved a wp site from basic hosting to a virtual server (ubuntu), and it's been a nightmare but I'm pretty much dome. One of my last problems is permalinks. When I set anything other than "basic" I get 404 errors.

I tried changing permissions to .htaccess but it won't help.

Pic is not me, just an example.

Any ideas?
>>
Wtf? Fuck Russia.
>>
var sleepCheck = function (numHours);

if (numHours >= 8) {
return "You're getting plenty of sleep! Maybe even too much!";
}
else {
return "Get some more shut eye!";
}



what's wrong with my syntax?
>>
>>55840354
>https://www.codecademy.com/
>http://www.w3schools.com/
>https://developer.mozilla.org/
Terrible pasta is terrible.
>>
>>55844393
your function doesn't have a body
>>
>>55844940
MDN is one of the best resources in OP, fuck off cunt.
>>
>>55845031
Good luck with that Web Dev jobhunt
Better get it quick though, it'll be fully automated by next week.
>>
I might be moving to a new job (another startup) but i think i'll need to supply my own machine, are there any reccomended laptops besides chinkpads for dev machines? It'd probably need to run a dev VM
>>
>>55844393

var sleepCheck = function(numHours){
if (numHours >= 8) {
return "You're getting plenty of sleep! Maybe even too much!";
}
else {
return "Get some more shut eye!";
}
}
>>
>>55845495

generally macbooks for startups
>>
>>55847461
nice man, should i grow out a beard and get a manbun. i'm buying a flannel shirt and some wayfarers with the lenses taken out too
>>
>>55847492
kek.

What are some other must haves for a startup?

Machine: Macbook
Editor: Atom
Backend: Ruby on Rails / Nodejs
Frontend: Angular
Car: Prius / Bicycle
Phone: iPhone
...
>>
>>55847535
Angular is for Pajeets, not hipsters.
>>
>>55847535
Frontend: React + Meteor or something
>>
>>55847535
$1k Herman Miller chairs
Overpriced itallian espresso machine
>>
>>55847647
> React + Meteor
gr9 b9 m9
>>
>>55847535
Dildo: Big and Black
>>
In my career they are only teaching me

>HTML, CSS, JS, Bootstrap
>Angular 2 + Typescript
>Serverside with Spring Boot

For Web Development, so what else should I learn by my own?
>>
>>55848067
sounds pretty solid already, though I'd add SQL to it.
I can't think of a web application without a database.

you can switch out bootstrap, angular, typescript and spring with something else if you want.
>>
>>55848000
Any other hipster front ends?
>>
>>55848138
Well yeah, in class we'll see databases too, mostly MySQL and H2, but I already learn about SQL on my databases subject last year.

Also this May I discovered that Boostrap on Angular 2 was barely working because I think javascript didn't work or something.
Was that fixed?
>>
>>55848267
What I mean is that you shouldn't use both Meteor and React on the same project, unless you have a very good reason.
>>
I know Angular1 but I got into React a couple of days ago instead of learning Angular 2. So... React or Angular 2 for the future?
>>
>>55848395
Looks like React, but hard to tell at the moment. Angular2 was a clusterfuck in a lot of ways during development, this turned a lot of people off. Still a long time before release.
>>
React router let's you have a route always active at '/'. Other routes go under words like 'foo' or 'foo/bar'.

So if I go to mysite.com/foo, the component at '/' and 'foo' will both be active.

This isn't the case in express's routing system. '/' and '/foo' are both distinct routes that serve their own separate resources.

Is this "always active index" feature unique to React's router, or is Express the unusual one? Or am I just not understanding something?

I thought it was kind of weird that React's routing system doesn't require the index ('/') to be present on it's routes (i.e. '/foo' vs 'foo' - where 'foo' is still interpreted as '/foo' in React).
>>
>>55848532
Nevermind, I've just realised why this is the case: nesting routes within routes in React router.
>>
>>55848487
Not him but
>Still a long time before release.
Wasn't release planned for this summer? Using Angular 2 this past year was a damn nightmare.
>>
>>55848683
Could be, but I wouldn't bet on it.

Check the todo list on github, it seems like they are still figuring out some key things.
>>
>>55847535
database: mongoDB
>>
>>55841486
You could look into Sass/Scss which allows you to set variables and the like.

$blue: #246462;
p { color: $blue; }
>>
I'm not sure anymore if I should learn Node or go with Python + flask/django for backend.

I have some more exp with JS, but Python is my favorite language. I have no idea what jobs in my area ask for, though. As far as I've seen, PHP is actually the most common (but I've had enough of that shit in college).

Then again, I don't think I'll want to do webdev professionally so I might choose whatever, but idk what is better. Preferably something that is more fun to work with, but not completely abstract like Rails.
>>
File: thank you javascript.png (112KB, 1148x481px) Image search: [Google]
thank you javascript.png
112KB, 1148x481px
I need help, /g/

I need to somehow let a user scribble on a canvas, but I need the line width to dynamically change (based on a number of things, such as the location of the cursor on the canvas)

I am aware that line thickness can only be defined once per stroke, so I've been trying to think of ways to hack my way around that.


The closest I got to it working (pic related) was using a bunch of maths to draw a line around the line points either side of the normal line (the distance from the point being the width I need at that point), and then using context.fill(). It almost worked, but there are a few issues with this approach that may be deal breakers.


Could anyone suggest/recommend a different approach?


I need this to run as close to 60fps as possible, so drawing lots of trapezoid shapes would not work. (as I've seen on google/stack overflow,)

I could try posting the old approach on a jsfiddle, if anyone wished
>>
>>55849710
If you're strictly looking at web development jobs there are lot more jobs in PHP, Javascript or Ruby than Python. A lot of the PHP jobs are really mundane shit like installing and tweaking Wordpress and other garbage though.

Outside of web development there are more Python jobs than either PHP or Ruby, but a lot of those are system administration jobs which I find boring as fuck.

I don't use any of them now, but I had to make the same decision 5 years ago and I chose Ruby simply because I enjoy it more than the others and the jobs tended to be more interesting to me (small teams with lots of freedom creating new products). If I had to make the choice again I'd learn both Ruby and Javascript for the same reasons. For the average website, Rails is still the most productive framework around and there's nothing in the node ecosystem that comes even remotely close to it but knowing Javascript is essential in any case.

If you're just desperate for a job PHP or Java would be your best bets by a huge margin.
>>
>>55850340
I've kept the width constant in the screenshot, so I can see it working properly first
>>
>>55844225
Nah, the links are somewhere in the wordpress database and need to be re-generated.

Don't mean to be a smartass but googling "regenerate wordpress links" might be the best idea.
>>
>>55842034
>Technically, loads of people learn CSS and their pages still look like shit

tfw.
I mean, I know a lot about it, all the shitty hacks, tricks and quirks and still I can't really give my applications a consistent theme.

Partially I blame my monitor. I don't know what my boss was thinking, but there's no accuracy whatsoever. When I see my pages on a proper screen all the shadows are different and all the colors and shades of grey are different...It's awful.
>>
>>55843353
It's a meme anyway. Yes, the user sees stuff earlier, but that's all worthless since they won't be able to interact with any of it until react actually loads everything.

At least a loading indicator is honest. Clicking something and having it show no reaction is frustrating.
>>
x = "There are %d types of people." % 10 
binary = "binary"
do_not = "don't"
y = "Those who know %s and those who %s." % (binary, do_not)

print x
print y

print "I said: %r." % x
print "I also said: %s" %y

hilarious = False
joke_evaluation = "Isn't that joke so funny?! %r"

print joke_evaluation % hilarious

w = "This is the left side of..."
e = "a string with a right side"

print w + e


what the fuck is the point of using strings when i can just type it in manually?
>>
>>55851025
(im reading learn python the hard way)
>>
>>55851025
In those examples there's no reason why you couldn't just type it in but they're just showing you how string formatting and concatenation works. In most real cases the string would be coming from elsewhere at runtime so you couldn't just type it in.
>>
>>55850408
your question is too complicated for a Kazakh welding BBS, try /sci/ or make your own thread on /g/
>>
Does anyone feel awkward at work? I'm a jr full stack web dev, just started last week, and i dont have shit to contribute at the daily stand up. I guess ill just do my best and see where i go
>>
>tfw stop a project for a few weeks and have no idea how to continue.
>>
File: 1463007116894.gif (1MB, 320x213px) Image search: [Google]
1463007116894.gif
1MB, 320x213px
>learning javascript
>started making small web app using bootstrap for front-end stuff
>mfw modals

Literally who came up with this entire fucking mess

>want to have a function that simply pops up a modal dialog, waits for input, gets the value, and then continues processing

This would be too easy, right? Instead, I have to use jquery shenanigans to create callbacks for a few buttons' class name, and another one for when the modal is hidden.

And because of this shit, I have to store program data in global variables in an extremely hackish way.

Why can't these people take a page from desktop GUI development? QT, WPF, and even Java Swing are more sensible than this.

Maybe I'm just retarded, but I literally cannot see how anyone enjoys frontend programming.
>>
Just change the z-index when you need the modal.

Think simple.
>>
>>55851598
look into promises
>>
>>55851664
Hiding/showing the modal is not the problem

The problem is with having the modal do useful fucking work.

I have an array of javascript objects that I need to update with user input from a modal.

Because I have one button for each object, I want to re-use the same modal for each button.
So, the HTML button used to create the modal has a property called "data-id", which is the object's index in the array.

Just passing this property into the modal, and having the modal update the right element's data, is a huge pain.
I got it to work now, but all this nonsense makes me miss Java's bloated (but still useful) system for interfaces and inheritance.

I would just create a class that inherits a JOptionPane, and set it's ActionListener or MouseListener to change the data I want.
No fuss, no muss, and the way it should be.

>>55851710
>promises

Never heard of that before, will take a look into it.
>>
I don't get why mongoose.model turns the name of my database collection into plural.
>>
>>55851888
that's a common thing for database frameworks.
I do that too, since a table is a collection of objects, so I name it "objects"
>>
Anyone use JQM?

Better for mobile than bootstrap in Cordova?

Does it mess with the regular jQuery I already have? I'm thinking of switching to it.
>>
>tfw just learn <script language="javascript"> is now just <script>

What a time to be alive.
>>
>>55852583
Hey, I can't answer your question because I don't know much about developing mobile apps. I actually asked in the thread before this one for advice.

I'm going to develop an API in PHP (not sure what kind of API yet) and have it serve data to the app. I asked what technologies I should use to build the interface besides Android Studio but didn't get many answers. What do you generally use?
>>
>>55853214
I just make a regular mobile page with HTML and JS then turn it into an app with Cordova.
>>
A simple react router question:
ReactDOM.render((
<Router>
<Route component={MainLayout}>
<Route path="/" component={Home} />
<Route component={SearchLayout}>
<Route path="users" component={UserList} />
<Route path="widgets" component={WidgetList} />
</Route>
</Route>
</Router>
), document.getElementById('root'));


Why doesn't path="users" or path="widget" require a forward slash before them (e.g. "/users" or "/widget") like it would if I were routing in node/express?

Is that just the way the react router works? Does it automatically assume "users" is meant to be interpreted as "/users"?
>>
>>55853460
Adding to this, I'm going to be using JQM for now on because of "pages".

I've been hacking this together for too long.

http://www.w3schools.com/jquerymobile/jquerymobile_pages.asp
>>
>>55853546
because its too stupid to differentiate between relative paths and absolute paths
>>
>>55851598
statically create the modal in html and make it invisible. Then just append the needed text / graphics and make it visible.
>>
>>55850340
what about doing it particle based so you spray a lot of shapes that when layered up look like a line. then you could vary each shape over time. For 60fps use requestAnimationFrame()
>>
If you're artistically challenged, what do you guys use for filler on your webpage? Is there anything that can generate decent looking header images?
>>
>>55854131
Which is too stupid? Node or react? Node always makes like a sith and deals in absolutes - correct?
>>
>>55842586
>Yeah it's good for stuff that aren't very database dependant.


..lol what? You can drop an ORM in with SQLAlchemy...
>>
I want text (h4) to go above an img in my carousel, but it keeps going behind the image. I have tried setting the headers zindex to high and the image to low, and used important but can't get this to work, any ideas?
>>
>>55847647
>Meteor

Is full stack.
>>
>>55840394
i really hope, tomorrow will do a job interview (php shit, inb4 pajeet, but it will be my first so i'm a bit of nervous)
>>
>>55848354
>What I mean is that you shouldn't use both Meteor and React on the same project, unless you have a very good reason.

Actually, even the Meteor devs themselves say to use React now, and they're moving toward gimping Blaze for it.
>>
>>55851025
Use .format()
>>
>>55851598
>And because of this shit, I have to store program data in global variables in an extremely hackish way.

Lel. Pick up React.
>>
>>55853546
>>55854131
I've found out the answer, it's all cool beans now
>>
>>55841486
#define BLUE 0x0000BB
:^)
>>
>>55853546
You should be using IndexRoute..

          <Route path="/" component={App}>
<IndexRoute component={NoteList} />
<Route path="/note/new" component={NoteEditor} mode="new" />
<Route path="/note/:_id/view" component={NoteViewer} />
<Route path="/note/:_id/update" component={NoteEditor} mode="update" />
</Route>
>>
>>55848000
>>55854510
Meteor's built-in templating engine in Blaze or something, you can swap it for Angular or React.

There's really no point in using Meteor though. Its entirely built around the idea of a kind of websocket interface to allow the server to push updates to the client. But in order to do this it uses its own version of MongoDB, and sacrifices a ton of developer control to enable that one feature, and if you want that feature there are better ways to get it.
>>
File: hipster2.jpg (16KB, 236x353px) Image search: [Google]
hipster2.jpg
16KB, 236x353px
>>55847535
Haircut: Hitler youth + beard
Attire: Flannel, checkered shirts, esoteric graphic tees
Office furnishings: Foozball table, couch and games console, standing desks, exposed brickwork.
Plan for generating revenue with their product: None, just stay afloat on venture capital until Google buys us.
>>
File: local-notes-4.gif (172KB, 1096x638px) Image search: [Google]
local-notes-4.gif
172KB, 1096x638px
>>55854673
>Meteor's built-in templating engine in Blaze or something, you can swap it for Angular or React.

E...exactly. The biggest plus of Meteor is its backend, Blaze is ass.

>There's really no point in using Meteor though. Its entirely built around the idea of a kind of websocket interface to allow the server to push updates to the client.

Lel, DDP is the best part of Meteor.


Working on local WebStorage notes app in React (mobile-first). Pretty much done, but playing around with it to see if I want to add anything else.

Working on
>>
Is it possible for the client to edit POST variables?

Let's say I send a username over POST.

Can they change that to any username they want?
>>
>>55854935
Look into validation.
>>
>>55854935
yeah. anything client side can be edited.
>>
>>55854935

yes, thats why you never trust what the UI sends to the server
>>
File: welcome-to-fa.jpg (3KB, 135x90px) Image search: [Google]
welcome-to-fa.jpg
3KB, 135x90px
>>55854749
You have to be out of shape and ugly so that you look even more ridiculous. Like tryhard /fa/ggots.
>>
>>55854935
NEVER trust the client.
Remeber that cookies are clientside too!
>>
>>55844225
If you use nginx instead of Apache you need a rewrite rule in your config. htaccess is a very Apache-specific thing.

Here are sample configs: https://codex.wordpress.org/Nginx

If you're not using Nginx - you're doing it wrong.
>>
>>55855024
Doing it in nginx is a pain in the ass.

Had to finally learn regexp because of that crap.

Also getting nginx to serve static webpages is a crappy hack. Nginx really doesn't deserve the praise it gets.
>>
>>55855066

The WP config has a lot of stuff you don't need. Rewrite for 404 -> index.php?request_args is the only thing you should have and even that's not a hard requirement.

>Also getting nginx to serve static webpages is a crappy hack.

What?

It's literally

server {
listen 80;
server_name fuckfing.hostname;
root /fucking/directory;
index index.html
}


Where's the hard part?
>>
>>55855123
The error I was having had me rewrite the error code for "can't serve static content" to something else so that it could serve static content.

I don't know if that's been fixed. Haven't used nginx in like 6 months.
>>
>>55855200
I'm fairly sure such a thing doesn't exist (and I've used it for years in varying setups). Sure you didn't just fuck up your permissions?
>>
>>55854784
>Lel, DDP is the best part of Meteor.

But most web apps don't need it, a request-based architecture is fine in most cases. And the DDP gimmick is not enough of a reason to use a stack that relies on MongLMAOdb in order to work.
>>
>>55854935
It sounds like you're trying to roll your own authentication/authorization. Please don't do this, its one of the hardest things to do correctly.
>>
>>55855239
Yes.

I use this whenever I install LEMP
https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-in-ubuntu-16-04
>>
>>55855270
>take username and password
>authenticate on server
>generate token server-side
>return token
>POST token on any request from client
>validate token before doing anything

Is this incorrect?
>>
What kind of projects did you have under your belt when you interviewed for your current/first job?
>>
>>55855361
I don't have a web dev job.

That said I have a gigantic self-made geolocations API and a self-sufficient fmylife clone generating passive income.

Everyone tells me to fuck off if they tell me anything at all.
>>
>>55855331
No.

https://www.youtube.com/watch?v=8ZtInClXe1Q
>>
>>55855361
I had a MEAN stack todo list and a jQuery widget on Github.

Now a node.js developer

Just apply to jobs.
>>
>>55855488
I know all that. PHP has password_hash and verify functions that you can even use bcrypt or mcrypt with.

I'm talking about user validation through tokens.
>>
>>55855488
Also even hashing and salting is stupid, because if the hacker has access to the server then he can just look at the register page or login page and see how the passwords are handled.

What the idiot in the video was actually talking about wasn't the server getting broken into, he was talking about SQL injection showing all the passwords and usernames.

The best defense against that would be prepared statements and heavy scrubbing.
>>
>do 20 minutes of styling work
>nothing changes in browser
>moving code around like crazy trying to figure out why

I hate that I always forget to force refresh the browser.
>>
>>55853567
So basically your mobile app built on HTML/CSS is just one big file sectioned into 'pages'? Doesn't that affect performance if you have a relatively sizeable app?
>>
Anyone know of any guides for controlling start and stop instances on amazon ec2 via node.js?
>>
>>55840435
Maybe for personal projects but don't believe to get a job!
>>
Fuck me why do so many databases exist?

>Cassandra DB

my sides
Thread posts: 147
Thread images: 11


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.