Submit templates for repl.it/templates here.

← Back to all posts
Server Starter
AnthonyMouse (78)

Here’s a template in NodeJS to help you get started in web dev with back-end!

Comments
hotnewtop
AloegelhiPlaysR (55)

Looks awesome. Also I saw FeixuRuins saying little effort, but think of this, who needs to use 100+ lines for a simple webserver?

AnthonyMouse (78)

Yeah thats what I was saying. Thanks! Upvote @AloegelhiPlaysR

programmeruser (529)

@AloegelhiPlaysR if you only need express.static you're better off using a HTML repl or npx static-here. A real backend would have routing, a database, etc.

AnthonyMouse (78)

IK, but they can now install important packages. @programmeruser

AloegelhiPlaysR (55)

Like FS and use fs for writing json files with user input from a textbox or something! @AnthonyMouse

AloegelhiPlaysR (55)

Glad we're on the same page. I much prefer node.js over html any day! @AnthonyMouse

programmeruser (529)

@AnthonyMouse you could have at least done routing with app.get instead of just using express.static.

AnthonyMouse (78)

Yeah, but this is supposed to encourage people to make big things. It’d be kinda hard with 100 files. But if you really want me too… @programmeruser

FeixuRuins (20)

This just uses express.static. Very little effort went into this.

AnthonyMouse (78)

Why do I need to create 500 lines of code for a simple server? @FeixuRuins

FeixuRuins (20)

@AnthonyMouse To make it actually useful. Look at this. Spot the difference? Static, not static.

AnthonyMouse (78)

Dude. This is a Server Starter. Not an advanced web app with Sass. @FeixuRuins

programmeruser (529)

@AnthonyMouse I agree with FeixuRuins, this is just express.static. You could've done this in less than 5
minutes.

AloegelhiPlaysR (55)

once again, SERVER STARTER, what if somebody doesnt know html or just needs a web server starter? @programmeruser

programmeruser (529)

@AloegelhiPlaysR if they don't even know HTML then backend is going to be kind of hard for them...

FloCal35 (366)

Nice job,looks good

AnthonyMouse (78)

do you want to work on a project together? @FloCal35