<<<<<<< HEAD
![Gitter](https://badges.gitter.im/Join Chat.svg)
rdash-angular is an AngularJS implementation of the RDash admin dashboard. The dashboard uses a small number of modules to get you started, along with some handy directives and controllers to speed up development using the dashboard.
Check out the live example!
- Clone the repository:
git clone https://github.com/rdash/rdash-angular.git
- Install the NodeJS dependencies:
npm install
. - Install the Bower dependencies:
bower install
. - Run the gulp build task:
gulp build
. - Run the gulp default task:
gulp
. This will build any changes made automatically, and also run a live reload server on http://localhost:8888.
Ensure your preferred web server points towards the dist
directory.
Continue developing the dashboard further by editing the src
directory. With the gulp
command, any file changes made will automatically be compiled into the specific location within the dist
directory.
By default, rdash-angular includes ui.bootstrap
, ui.router
and ngCookies
.
If you'd like to include any additional modules/packages not included with rdash-angular, add them to your bower.json
file and then update the src/index.html
file, to include them in the minified distribution output.
This repo uses JSON Web Tokens and the jsonwebtoken package to implement token based authentication on a simple Node.js API.
This is a starting point to demonstrate the method of authentication by verifying a token using Express route middleware.
- node and npm
- Clone the repo:
git clone git@github.com:scotch-io/node-token-authentication
- Install dependencies:
npm install
- Change SECRET in
config.js
- Add your own MongoDB database to
config.js
- Start the server:
node server.js
- Create sample user by visiting:
http://localhost:8080/setup
Once everything is set up, we can begin to use our app by creating and verifying tokens.
Send a POST
request to http://localhost:8080/api/authenticate
with test user parameters as x-www-form-urlencoded
.
{
name: 'Nick Cerminara',
password: 'password'
}
Send a GET
request to http://localhost:8080/api/users
with a header parameter of x-access-token
and the token.
You can also send the token as a URL parameter: http://localhost:8080/api/users?token=YOUR_TOKEN_HERE
Or you can send the token as a POST parameter of token
.
6ad011c59e8ef1d472729f8acb1796a7127a0a53