Code Monkey home page Code Monkey logo

cane_passport's Introduction

#Cloudant Angular Node Express with Bootstrap

I searched around for a project that demonstrated using Cloudant and Node with authentication. I could only find examples using Mongo and Passport JS, so this is a modification of a project that demonstrates using the new Cloudant Node library.

Forked from mancioshell/NodeJS-ExpresJS-MongoDB-AngularJS-Bootstrap-NotyJS-seed and spiced with Twitter Bootstrap.

Start an awesome app with AngularJS + Bootstrap on the front, Cloudant + Express + Node on the back. This project is an application skeleton for a typical AngularJS web app for those who want to use Node to serve their app with the new Cloudant Node Library.

The seed contains angular libraries, test libraries and a bunch of scripts all preconfigured for instant web development gratification. Just clone the repo (or download the zip/tarball) and you're ready to develop your application.

The seed app shows how to wire together Angular client-side components with Express on the server. It also illustrates writing angular partials/views with EJS.

How to use Cloudant-angular-node-express seed application

Clone the Cloudant-angular-node-express-seed repository.

run `npm install` to grab the dependencies  
run `bower install` to grab the static file dependencies

Initializing the application

If you don't have a Cloudant account you need to create a new one at Cloudant. You'll then need to modify the config.js file with the account information:

config.cloudant.account = "yourusername"
config.cloudant.password = "yourpassword"

Once you start the application, you will need to setup the application by navigating to a setup URL and create the database, admin user, and Cloudant Query index on the username:

http://localhost:3000/setup

Running the app

Runs like a typical express app:

node app.js

Once you've run the setup function, you can login as the admin user or create a new user by clicking on the Reigster link.

Receiving updates from upstream

Just fetch the changes and merge them into your project with git.

Directory Layout

app.js              --> app config
package.json        --> for npm
bower.json          --> for static JS files
public/             --> all of the files to be used in on the client side
  bootstrap/        --> all bootstrap files
    css/
    img/
    js/
  css/              --> css files
    app.css         --> default stylesheet
    bootstrap_custom.css      --> custom stylesheet
  img/              --> image files
    cloudant_ibm.png          --> Banner image
  js/               --> javascript files
    app.js          --> declare top-level app module
    controllers.js  --> application controllers
    directives.js   --> custom angular directives
    filters.js      --> custom angular filters
    services.js     --> custom angular services
    
routes/
  api.js            --> route for serving JSON, contains MongoDB configuration
  routes.js         --> route for serving HTML pages and partials
views/
  index.html        --> main page for app
  setup.html        --> setup page for creating a DB
  webapp.html       --> session authenticated page
  partials/         --> angular view partials (partial jade templates)
    home.html
    login.html
    register.html

cane_passport's People

Contributors

ddemichele avatar

Watchers

 avatar  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.