Node.js Tutorial for Beginners - 16 - Express

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

best one minute intro/rollercoaster of emotion

josephdburdick
Автор

For those who want to have similar directory structure as Bucky:
1. Install Express generator "sudo npm install -g express-generator"
2. Go to directory where you want to create project and type "express myapp --ejs"
3. Select newly created directory --> "cd myapp"
3. Install all node_modules --> "npm install"
4. Run server --> "npm start"

Have fun ;)

adriangasiewicz
Автор

For people using sublime or any other text editor:

npm install express

Wait until it finishes installing.

To make life easier, we will use a neat little module called express-generator. What this will do is it will generate a skeleton website for us, making out life a lot easier. It takes care of the basic stuff, like routes and such. To install Express Generator, simply type:

npm install express-generator -g

We specify the -g flag, which means that it will be global, and we can use it throughout our system. Once we finish installing it, we have to make a decision. We have to choose what rendering engine we want to use for our project. For brevity, we will use ejs in this tutorial, which is an awesome rendering engine that I highly recommend you look more into. To setup our bare project, just type:

express -v ejs mysite

This will make a new folder inside of our existing project, with the name mysite. Now, to make sure we have all of the required modules for the project, run the following command.

npm install

Now that we have the basic website setup, we can start it! To start the website, with a basic port, simply type:

DEBUG=mysite:* npm start

praveenojha
Автор

For noob people like me who are using sublime text. This is what I did
open terminal 
-> npm install -g express (if you already haven't installed express. -g means install it globally)

Now open terminal in the folder that you want to create the project in
-> express -e (-e means use ejs like Bucky is using in the video) let it do its stuff

then...
-> npm install

To run the server you do  DEBUG=DIR_NAME:* npm start. for example my folder was called NODE-EXPRESS so I did  DEBUG=NODE-EXPRESS:* npm start

bigboateng
Автор

hey @thenewboston . I have just stumbled across your channel again and I find the style you teach is GOD DAMN BRILLIANT . Im guessing maybe 10 years ago some of your older lessons helped me out a lot as well and i pay-pal ed you a few bucks. Dude keep up the great work !! tyty

mrz
Автор

"If Python and HTML had a baby, it'd be Jade"
PREACH!

abhishekamin
Автор

I'm sure Megan will be all over you once she sees this tutorial... especially with that sexy story about eating pizza with your shirt off! lol

MayronWoW
Автор

Hey best Bucky my boy, so happy to hear that your health scare was just you getting your cheese on.

danielllalivedutoit
Автор

brother, sometimes you share a bit too much, but these tutorials are awesome, thank you.

MicroUrb
Автор

i shall not judge you. sometimes when my daughter and i go pick up pizza we end up eating half of it in the car on the way home. it can be ....less than ideal. i enjoy the straightforward and logical explanations of node. thank you.

RS-lbbb
Автор

If Python and HTML had a baby, that would be Jade. Dude you are awesome!

hangchen
Автор

I like your stories :D particularly on resturant n eggs ...ha ha ha ...great work for beginners

rasmiatx
Автор

That line - "If pyton and html had a baby, it would be Jade"! Hahah, awesome!

manveersingh
Автор

You were right the first time...

Jade IS weird. So is python.
White space Indentation as syntax is WEIRD.

coolworx
Автор

Sir Bucky, I am happy to watch all of your video, but I have a problem when it comes to this episodes, may I ask a favor on you?
I am currently using Sublime Text 3, so that it would be hard for me to see all the codes you have in IntelliJ idea, .. anyway my favor is May I get your source code in this Megan folder included its all content?
hoping for your immediate response
and many thanks to you..

reymondturbanada
Автор

That Megan comment, bar the McDonalds part. Lmao

AroundWayOther
Автор

I installed this IDE.But my external libraries are not expandable.Please tell me how to do that because when I create a project I do not get the option for configure core modules as the video says

Mythanuja
Автор

i was really enjoying these tutorials. sucks to know i have to stop here because you aren't using freeware and none of the comments of suggestions worked for me.

roidrage
Автор

Hi Bucky,
Awesome videos. Just wondering, did you ever make a video on OOP Design Patterns? If not, are you going to make one? Thx.

AtamMardes
Автор

Just for the cheese story, you sir get a like :D

caitancorreia