DEV Community

Cover image for Learn Deno: Chat app

Learn Deno: Chat app

Aral Roca on May 10, 2020

Original article: https://aralroca.com/blog/learn-deno-chat-app Node.js was writtern initially by Ryan Dahl on 2009 (in C++). Ryan left Node.js in...
Collapse
 
guillermopx profile image
Guillermo Palafox

Very soon... "We need a deno dev with at least 5 years of experience"

Collapse
 
madza profile image
Madza

should be already somewhere if you search enough, lol xddd

Collapse
 
danyalasif profile image
Daniyal

Hi, great article! I was following this and wanted to add my own stylesheet. So I made an external stylesheet and tried to load it in the html, but now the browser gets stuck at the request to the stylesheet in browser, the request stays pending.

Is there anything different I need to do? I think I need to include it in Deno static assets somehow?

Collapse
 
aralroca profile image
Aral Roca • Edited

This is because you are only serving the index.html file on the server. You also need to serve the file with your styles. Normally a better way is just to serve a public dir with all the statics / assets.

Collapse
 
jmpp profile image
J.M. Cléry

Wow man that's a really clear and complete guide to get started with Deno. Thank you very much !

Little typo for the tests part :

| To run all tests, we just need to execute deno test.
| ➜ deno deno test

I guess it's just deno test 😉

Collapse
 
aralroca profile image
Aral Roca

hehe thanks! This is because I worked in a folder named deno... hah! I'm going to change it! Thank you

Collapse
 
thealiilman profile image
Ali Ilman

In the article, you mentioned that v1.0.0 is being released on the 13th of March 2020. I assume this is a typo? 😝

Great article by the way! Deno looks promising.

Collapse
 
aralroca profile image
Aral Roca

It's May yes. It's a typo. I'm going to fix It! Thanks

Collapse
 
devhammed profile image
Hammed Oyedele

It is not a typo...the project has been going on for long and the wait for 1.0.0 is over.

Collapse
 
thealiilman profile image
Ali Ilman • Edited

The latest version in overall is 1.0.0-rc2, not 1.0.0. Both are different. 🙂
image

Thread Thread
 
devhammed profile image
Hammed Oyedele

I know that, v1. 0.0 will be released on May 13th so what the author said is not a typo

Collapse
 
emptyother profile image
emptyother

Got this example working in Deno 1.0.0 with debugging and breakpoints in VSCode. But for some reason VSCode refuses to show console.log() outputs. Ideas to why?

Collapse
 
bmstschneider profile image
bm-stschneider

Great article. First tutorial for deno I have seen.

Collapse
 
murtaza profile image
Murtaza Ahmad

what is main difference between nodejs and deno

Collapse
 
tremainebuchanan profile image
Tremaine Buchanan

Deno is an improvement on the mistakes made in Nodejs as mentioned by its creator.

Collapse
 
simbo1905 profile image
Simon Massey

Watch this video from the inventor of Node.js who is the inventor of Deno who describes the 10 biggest regrets he has about design mistakes he made in Node.js youtu.be/M3BM9TB-8yA

Collapse
 
aralroca profile image
Aral Roca • Edited

here is well explained deno.land/manual#comparison-to-nodejs

Collapse
 
eatsjobs profile image
Pasquale Mangialavori

Thanks for found time writing this.

Collapse
 
amiamigo profile image
Ami Amigo

Awesome! Let's be among the first people to learn it when it's officially out!

Collapse
 
chathula profile image
Chathula Sampath

How can you deploy deno like we did in nodejs by using something like forever or pm2?

I know we can use docker. I just want to know other ways.

Collapse
 
aralroca profile image
Aral Roca

You can use pm2 with deno, pm2 can run non-node stuff.

Collapse
 
assertnotnull profile image
Patrice Gauthier

That's very interesting.
Do you know how is the caching of libraries locally with this new approach?

Collapse
 
aralroca profile image
Aral Roca

Is centralised for all your projects in the same folder. If you run deno info you can see where is stored.

➜  deno info
DENO_DIR location: "/Users/aralroca/Library/Caches/deno"
Remote modules cache: "/Users/aralroca/Library/Caches/deno/deps"
TypeScript compiler cache: "/Users/aralroca/Library/Caches/deno/gen"
Collapse
 
jod35 profile image
Ssali Jonathan

Nice tutorial

Collapse
 
scostan profile image
S

thanks for the tutorial :)

Collapse
 
oscar6echo profile image
oscar6echo

Very useful introduction, not too complex, not too vague. Thx man !

Collapse
 
spencerflagg profile image
Spencer Flagg • Edited

Great article! Any suggestions for a good Deno webhost for small projects?

Collapse
 
aralroca profile image
Aral Roca

You can use Vercel, that is free for personal projects. To add deno on Vercel you can follow this: github.com/lucacasonato/now-deno

Collapse
 
amejiarosario profile image
Adrian Mejia

This is very cool! I didn't know Deno was ready to use it!

Collapse
 
vcs222 profile image
vcs222

you have a typo in "Dino 1.0.0"

Collapse
 
aralroca profile image
Aral Roca

Thank you so much! I'm going to fix it now!

Collapse
 
ahmaddeel profile image
AhmadDeel

does it compile the .ts file into .js one or does it directly run ts files?