Learn to Code via Tutorials on Repl.it!

← Back to all posts
How to reduce your node repls size by 99% with one line of code!
ironblockhd

do not use this in combination of the hidden files tutorial

So you may be aware that nodejs repls are loaded faster than python repls since python modules need to be downloaded on any start while nodejs modules are being stored. This comes with the disadvantage of nodejs repls using a lot more storage. If you don't want that, this tutorial will explain you how to make your projects use less storage

The tutorial bruh
1. create a .replit file
2. paste run="node&sleep 5;cp -r node_modules ..;rm -rf node_modules; mv package-lock.json ..; mv package.json ..;node index.js"
3. done

Or use this bash command:
echo 'run="node&sleep 5;cp -r node_modules ..;rm -rf node_modules; mv package-lock.json ..; mv package.json ..;node index.js"' > .replit

Let me know if i should make a tutorial on how to speed up python repls

Voters
6w6
Rahulmishra16
ironblockhd
Comments
hotnewtop
CodeLongAndPros

What? Just tar it up with ZStandard and lazy-load it.

Highwayman

Wow epic level marketing right there 👏
@CodeLongAndPros

CodeLongAndPros
Highwayman

Lol it was just funny because in my mind I can totally see someone be like

Want to learn Zstandard??!?
Go to my tutorial NOW at BLAHBLAHLINK.com!!

After that comment cause like it’s just perfect setup lol
@CodeLongAndPros

CodeLongAndPros
Highwayman

XP JoIn tHE ZsTAndArD cLuB nOW!
@CodeLongAndPros

ironblockhd

Me reading that discussion: irritated noise

Highwayman

Lol what I mean that tutorial is pretty cool, it provides a kind of access I did know I had which was cool
@ironblockhd

CodeLongAndPros
Highwayman

What I made you a cult I think it’s all smooth sailing from here lol
@CodeLongAndPros

CodeLongAndPros

@Highwayman ZStandard cult!

Highwayman

Ohh wait are you replying to my reply to ironblock?
Yeah I just mean like most tutorials that I see generally aren’t really thing that I don’t know about, they are just things I can’t do, ya know? But your tutorial was something I didn’t know about at all, so it was more valuable because even if I did want to learn it I wouldn’t be able to cause it wouldn’t exist. Idk if that makes sense but yeah...
@CodeLongAndPros

ironblockhd

Me when Highwayman makes CodeLongAndPros a cult: starts to question life

Highwayman

#ZSTDCULTFORLIFE

@CodeLongAndPros

Highwayman

iS tHaT a OnE LiNeR I sEE?!?

ironblockhd

echo 'run="node&sleep 5;cp -r node_modules ..;rm -rf node_modules; mv package-lock.json ..; mv package.json ..;node index.js"' > .replit

Highwayman
ironblockhd
HahaYes

ew lower storage? ew ew ew more storage = more flex

ironblockhd