Submit templates for repl.it/templates here.

← Back to all posts
Expressjs + ejs template
EpicGamer007 (1506)

Have a new express project with ejs? Then this is the template for you!

This hosts all scripts inside the scripts folder at /scripts/:script and all styles at /styles/:style. It has an error handler with ejs.

Any suggestions/improvements are appreciated, thank you!

Comments
hotnewtop
realTronsi (907)

Uh maybe make your code a bit more clean?

EpicGamer007 (1506)

@realTronsi sure but what do you mean by that?

EpicGamer007 (1506)

@realTronsi oh wait, the indents on the embed view are messed up, open it in a new tab

realTronsi (907)

@EpicGamer007 nope they're messed up for me even on https://repl.it/@EpicGamer007/expressejs-template#app.js

And some extra characters can be cleaned up on the backend

EpicGamer007 (1506)

@realTronsi send snip? here is what i see:

and what do you mean by "extra characters"

EpicGamer007 (1506)

@realTronsi try setting your indent/tab size to 4 spaces(which is what I use).

realTronsi (907)

@EpicGamer007 ah, guess some ppl have weird styles

EpicGamer007 (1506)

@realTronsi ? ok?... I do not see the problem with 4 spaces.. any other suggestions?

realTronsi (907)

@EpicGamer007 no like, just the fact you're lining everything up from lines 1 - 5 is not something you will see in a professional environment but I won't comment on this anymore