Coder Social home page Coder Social logo

expressjs.com's Introduction

expressjs.com

This is the repository of the website expressjs.com. It is hosted directly from the repository as a GitHub Pages website.

Local Setup

To preview the website locally:

  1. Install Ruby and Bundler if you don't have them already.

  2. Install the jekyll-redirect-from gem:

    $ gem install jekyll-redirect-from
  3. Clone this repository by running the following command:

    $ git clone https://github.com/expressjs/expressjs.com.git
  4. Navigate to the cloned repository directory and run the following command:

    $ bundle install

    Bundler will look in the Gemfile for which gems to install. The github-pages gem includes the same version of Jekyll and other dependencies as used by GitHub Pages, so that your local setup mirrors GitHub Pages as closely as possible.

  5. Run Jekyll using the following command:

    $ bundle exec jekyll serve

    Then, load http://localhost:4000 in your browser.

Formatting

Jekyll uses a variant of Markdown known as Kramdown.

Jekyll uses the Liquid template engine for templating.

You can use GFM fenced code blocks for JavaScript; for example:

```js
var express = require('express')
var app = express()
app.listen(3000)
```

The result looks like this:

const express = require('express')
const app = express()
app.listen(3000)

The default GitHub Pages syntax highlighting has been disabled in _config.yml to allow highlighting with prism.js.

Contributing

Feel free to make changes to the template files or the document files. The supporting docs are located in their respective directories, and the API docs are located under the _includes directory.

Please see the Contributors' Guide for more information on contributing to the documentation, including information on contributing translations.

Why use Jekyll instead of an Express-based solution?

Jekyll comes built-in with GitHub Pages. Since we are already using GitHub Pages to host the website, it makes sense to leverage the capabilities it provides. It's all about using the right tool, for the right job, under the right circumstances.

expressjs.com's People

Contributors

a-deeb avatar afucher avatar ahmetomerv avatar alanhoff avatar altsang avatar brunowego avatar crandmck avatar dangelzm avatar defunctzombie avatar dougwilson avatar gidenilson avatar gvenzl avatar hacksparrow avatar iphayao avatar jonathanong avatar jonchurch avatar jordonias avatar klyburke avatar madarche avatar martinerko avatar nebrelbug avatar oskosk avatar rafael-franca avatar ritch avatar ryush00 avatar silverskyvicto avatar startergate avatar tj avatar vitaly-t avatar zackdever avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

expressjs.com's Issues

Typo

There is a typo in en/api/res-cookie.jade:

Set cookie name to value, where which may be a string or object...

should have "where which" be "which"

Set cookie name to value, which may be a string or object...

Will issue pull request.

make v2.x documentation available somewhere

The FAQ & footer should be updated to point to the 2.x documentation. This could also take the form of a docs directory in the express 2.5 module which contains the site.

There are still a lot of people using v2.x of expressjs but currently, I can't find that documentation anywhere anymore, except for Google's cache.

res.send([body|status], [body])

Finally when a Number is given without any of the previously mentioned bodies, then a response body string is assigned for you. For example 200 will respond will the text "OK", and 204 "Not Found" and so on.

204 means "no content"๏ผŒ I think u may want to type 404, :)

font contrast is too low

The expressjs.com looks awesome, but it's hard to read. the font contrast is way too low. It hurts to read! please reconsider the font colour.

Cheers.

Error in Middleware csrf()

This middleware requires session support, thus should be added somewhere below session().

There is no middleware called session(), perhaps this should be cookieSession()?

Add SEARCH verb support

Hello TJ,

I was wondering if there's a plan to add support for verbs like SEARCH:

https://datatracker.ietf.org/doc/rfc5323/

It was added in Node 0.7.6, I believe. I've been browsing through expressjs' sources and saw a list of verbs listed but 'search' is not part of the list:

node_modules/express/node_modules/methods/index.js

Just for kicks, I added 'search' at the end of the list and re-run my app. It works as expected. Would you please consider adding it? Thank you very much.

extending app.get method

I'm trying to extend the app.get behavior but it seems that after doing it, the app losses some configuration I did before extending it.

In the following snippet the /sample and /es/sample output are empty and the expected output should be 'value'

Am I doing something wrong?

var app = require('express')();

app.set('myprop', 'value');

var _get = app['get'];

app['get'] = function (route, middleware, callback) {
    _get.call(app, route, middleware, callback);

    // For instance: I generate a new route for 'es' language.
    _get.call(app, '/es' + route, middleware, callback);
};

app.get('/sample', function(req, res){
    res.send(app.get('myprop'));
});

app.use(app.router);
app.listen(3000);

Express app: trello.com

  : http -h https://trello.com
HTTP/1.1 200 OK
Content-Encoding: gzip
Content-Length: 41754
Content-Type: text/html; charset=UTF-8
Date: Sat, 22 Jun 2013 09:31:02 GMT
ETag: f855708f9494a80649bc7f152cc5a105
Set-Cookie: sup=1; Path=/; Expires=Sun, 22 Jun 2014 09:31:02 GMT
X-Powered-By: Express

DropTask app - running Express 3

https://www.droptask.com

DropTask is a visual task management app designed for teams and individuals. It uses beautiful visuals to help users organise their tasks, and collaborate with other DropTask users. It works on the desktop, on the iPad, and in all major mobile phone browsers.

The DropTask server is written using Express 3.

homepage

Error in the Users Online Count example in guide.html

There seems to be a small error in the users online count example on the Guide page of the website. The code example part

app.get('/', function(req, res){
  res.send(req.online + ' users online');
});

should return the number of users online (req.online.length) if I'm correct, not all online users (req.online):

app.get('/', function(req, res){
  res.send(req.online.length + ' users online');
});

besides that, identifying users by their browsers usersagent may not be that accurate, it rather counts the number of different browsers than the number of users... besides that it is a nice example showing how easy it is to integrate with redis!

Installing as described in the guide fails.

In the guide: http://expressjs.com/guide.html

The package.json contains

{
  "name": "hello-world",
  "description": "hello world test app",
  "version": "0.0.1",
  "private": true,
  "dependencies": {
    "express": "3.0.0"
  }
}

but the command

$ npm install

fails on a fresh node installation. (iMac, OS X 10.7.4)

Changing the package.json to

{
  "name": "hello-world",
  "description": "hello world test app",
  "version": "0.0.1",
  "private": true,
  "dependencies": {
    "express": "3.0"
  }
}

works.

Console:

iMac:hello-world geon$ npm install
npm WARN package.json [email protected] No README.md file found!
npm http GET https://registry.npmjs.org/express/3.0.0
npm http 404 https://registry.npmjs.org/express/3.0.0
npm ERR! Error: version not found: 3.0.0 : express/3.0.0
npm ERR!     at RegClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:246:14)
npm ERR!     at Request.init.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/main.js:120:22)
npm ERR!     at Request.EventEmitter.emit (events.js:91:17)
npm ERR!     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/main.js:555:16)
npm ERR!     at Request.EventEmitter.emit (events.js:88:17)
npm ERR!     at IncomingMessage.Request.start.self.req.self.httpModule.request.buffer (/usr/local/lib/node_modules/npm/node_modules/request/main.js:517:14)
npm ERR!     at IncomingMessage.EventEmitter.emit (events.js:115:20)
npm ERR!     at IncomingMessage._emitEnd (http.js:366:10)
npm ERR!     at HTTPParser.parserOnMessageComplete [as onMessageComplete] (http.js:149:23)
npm ERR!     at CleartextStream.socketOnData (http.js:1356:20)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <[email protected]>

npm ERR! System Darwin 11.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/geon/Eget/node/hello-world
npm ERR! node -v v0.8.4
npm ERR! npm -v 1.1.45
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/geon/Eget/node/hello-world/npm-debug.log
npm ERR! not ok code 0

Showcase Cozy Cloud, a private personal cloud built on top of Express

Hi all,

First, thank you for Express which is really an awesome framework!

I would like to submit Cozy Cloud to you for your showcase page. Cozy Cloud, is a young start-up that develops the first private personal cloud. It's an open source initiative with an emphasize on user empowerment and respect of privacy. We love the internet and cloud computing, but we want to create a new paradigm more respectful of the users.
All the Cozy Cloud apps are built on top of CompoundJS that is an augmented version of Express. We enjoy using Express, so we will be happy to see Cozy on your website!

Description: Cozy Cloud is a whole new paradigm for web services: it is your own private personal cloud. Cozy gives you a personal server, a place you can trust to store all your personal data and host your web apps. You can hack it, you can host it and you can delete it. You are in control and your privacy is respected.

Website: https://cozycloud.cc/
code: https://github.com/mycozycloud/
Screenshots:

home

i18n

clean up the build system a little to facilitate multiple languages in this repo

A full-stack JS app based on ExpressJS: Figurepool

Figurepool uses ExpressJS all over: http://figurepool.com. The whole site is built in JavaScript starting from frontend (including an advanced vector graphics editor - HTML 5, no Flash), going through backend (NodeJS + ExpressJS) up to the DB (CouchDB).

Thanks for the framework! I really enjoy using it.

redo design

this sucks but we need something for now :D

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.