Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the ExpressJS documentation?

Tags:

express

For instance, this is a sample of what is created after typing the express command:

app.set 'port', process.env.PORT or 3000
app.set 'views', __dirname + '/views'
app.set 'view engine', 'jade'
app.use express.favicon()
app.use express.logger 'dev'
app.use express.bodyParser()
app.use express.methodOverride()
app.use app.router
app.use express.static path.join __dirname, 'public'

(converted into CoffeeScript that is).

But visiting http://expressjs.com reveals no documentation for any of this. 'views'? 'views engine'? express.bodyParser()? Where is all this?

It's not at any of these locations:

  • http://expressjs.com/api.html
  • http://expressjs.com/faq.html
  • http://expressjs.com/guide.html

The little amount of documentation that exists is next to useless:

app.set(name, value)
Assigns setting name to value.

What is this I don't even...

Maybe I'm missing something obvious? I'm not looking for tutorials; they only give you part of the picture -- I want an official, comprehensive overview.

Thanks!

like image 942
Nick Avatar asked Mar 24 '26 13:03

Nick


1 Answers

This code is essentially setting up a the middleware used in your express app. A lot of this middleware Is part of the connect middleware framework which express is built on top of. As mentioned by JohnnyHK in the comments, you can find more info on these in the connect documentation.

I agree that there should be more on the express site explaining what is going on, or at least something pointing new users in the right direction to find the info.

like image 190
Benjen Avatar answered Mar 26 '26 12:03

Benjen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!