Giter Site home page Giter Site logo

node-express-bootstrap-simple's Introduction

node-express-bootstrap-simple

This is about the simplest demonstration of Node.js/Express.js working with Bootstrap. This is a sister demo to my project sinatra-bootstrap-simple -- they do the exact same thing.

Simple:

  • decreases dependencies
  • shows a reader what is actually required

Included:

  • package.json -- so you know the dependencies
  • (Twitter) Bootstrap 3.3.5 - unpacked in public/(css,js,fonts)
  • JQuery 1.11.3 that the Bootstrap examples used - unpacked in public

Note: I am not an expert. (yet)

It played well with Node v4.2.2 and NPM 2.14.7.

Starting from ground zero

On Linux I can do this as a non-root user (I'm sure OSX is similar):

wget https://nodejs.org/dist/v4.2.2/node-v4.2.2-linux-x64.tar.gz
tar -xzf node-v4.2.2-linux-x64.tar.gz
cd node-v4.2.2-linux-x64
export PATH=~/node-v4.2.2-linux-x64/bin:$PATH
git clone https://github.com/syserr/node-express-bootstrap-simple
cd node-express-bootstrap-simple
npm install
npm start

Wow, that's it?

Yes, Node.js/Express.js using Bootstrap in just a few minutes.

Thoughts

The documentation on using a layout in Express.js is sparse and all over the place. That was the most difficult part of this demo. I believe Express (proper) didn't have layouts until recently. Many different implementations by anyone that can make an npm, then a few tries at a blessed approach. So the latest and greatest works pretty well, but I found many many ways to do it wrong and depreciated before I found "the right way." This seems to be a problem in web development but Node seems particularly bad -- so many helper implementations trying to fill a void because frameworks are immature. I almost went with Koa framework for the demo, but some of the syntax wasn't appealing and didn't love the how layouts worked. Koa is probably better, but I wanted mainstream.

node-express-bootstrap-simple's People

Contributors

syserr avatar

Watchers

 avatar

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.