Giter Site home page Giter Site logo

cloudxtreme / node-stripe-charge Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mjhea0/node-stripe-charge

0.0 1.0 0.0 430 KB

node + stripe + express + bootstrap 3 (used for one time charges)

License: MIT License

JavaScript 83.79% CSS 0.09% HTML 16.11%

node-stripe-charge's Introduction

Node + Stripe + Express

Build Status

Coverage Status

This is a template for you to use on your own projects for processing one-time Stripe charges. Follow the directions below to get started.

Looking for a simple example? Node Stripe Example

The back-end API includes:

  1. User auth
  2. Stripe integration
  3. Testing via Mocha and Chai as well as Istanbul for code coverage

Quick Start

  1. Clone and install dependencies
  2. Update the config:
  • Rename the .env_sample file to .env and update
  • Update the Mongo URI in /src/_config.js (if necessary)
  1. Update the key on line 1 of src/client/js/main.js
  2. Run mongod in a seperate terminal window
  3. Run the app - npm start or gulp

The database, if empty, is seeded with an admin user - username: [email protected] / password: admin

Development Workflow

  1. Create feature branch
  2. Develop/test locally (hack! hack! hack!)
  3. Create PR, which triggers Travis CI
  4. After tests pass, merge the PR
  5. Tests run again on Travis CI
  6. Once tests pass, code is deployed automatically to staging server on Heroku (WIP)

Tests

Without code coverage:

$ npm test

With code coverage:

$ npm run cov

Changelog

  1. 02/09/2016 - refactored passport, tests, error handlers, client-side javascript (view commit)
  2. 04/23/2015 - major refactor
  3. 03/11/2015 - updated to Express 4.x

JSON API Documentation

Admin required for all routes!

Users

  • GET /api/v1/users - get all users
  • GET /api/v1/users/:id - get user
  • POST /api/v1/users - create user
  • PUT /api/v1/users/:id - update user
  • DELETE /api/v1/users/:id - delete user

Products

  • GET /products - get all products
  • GET /products/:id - get products
  • POST /products - create products
  • PUT /products/:id - update products
  • DELETE /products/:id - delete products

Store

  • GET /stores - get all stores
  • GET /store/:id - get store
  • POST /stores - create store
  • PUT /store/:id - update store
  • DELETE /store/:id - delete store (need to test)

Plan (todo)

  • GET /plans - get all plans
  • GET /plan/:id - get plan
  • POST /plans - create plan
  • PUT /plan/:id - update plan
  • DELETE /plan/:id - delete plan

Screenshots

Main Page

main

Charge Page

charge

Successful Charge

success

Admin Page

admin

node-stripe-charge's People

Contributors

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