项目作者: NauCode

项目描述 :
Inspired by ChickenKyiv node-stripe-membership-saas with some additions, due to inactivity on GitHub
高级语言: JavaScript
项目地址: git://github.com/NauCode/node-stripe-membership-saas.git
创建时间: 2019-04-18T16:59:25Z
项目社区:https://github.com/NauCode/node-stripe-membership-saas

开源协议:MIT License

下载


Node Stripe Membership SaaS

This project is a fork/update of the Repo by ChickenKyiv/stripe-recurring-membership. I did it because it was not updated, several dependencies were really outdated and in general I wanted to maintain it adding new features.

It is a boilerplate express app for creating a membership/subscription site with Stripe, mongodb and pug. It also handles stripe webhooks.

Demo: Coming soon!

Running Locally

Make sure you have Node.js. If you want to deploy it to Heroku, be sure to have the Heroku CLI installed.

  1. $ git clone https://github.com/NauCode/node-stripe-membership-saas.git # or clone your own fork
  2. $ cd node-stripe-membership-saas
  3. $ npm install
  4. $ npm start

System Requirements

  • mongodb
  • nodejs

Your app should now be running on localhost:3000.

Getting Started

First update /server/config/secrets.js with the following credentials:

  • Stripe API keys and plan info
  • Mailgun for sending forgot/reset password confirmations.
  • session secret (you can use a long random string)
  • google analytics id

Install dependencies with npm install.

Start the server with node server.

Note: Stripe webhooks can be recieved at https://your-url.com/stripe/events.

https://stripe.com/docs/subscriptions/quickstart
https://stripe.com/docs/testing

create .env file for storing information

install dotenv package: npm install dotenv —save

Deploying to Heroku

  1. $ heroku create
  2. $ git push heroku master
  3. $ heroku open

or

Deploy to Heroku

Documentation

For more information about using Node.js on Heroku, see these Dev Center articles:

Heroku Deployment

  1. heroku create your-awesome-saas-product
  2. heroku addons:add mlab
  3. heroku config:set SESSION_SECRET='your_secret';
  4. heroku config:set STRIPE_TEST_KEY='sk_test_example'
  5. heroku config:set STRIPE_TEST_PUB_KEY='pk_test_example'
  6. heroku config:set MAILGUN_USER='example.org'
  7. heroku config:set MAILGUN_PASSWORD='key-secret'
  8. heroku config:set GOOGLE_ANALYTICS='UA-XXXXXX-1'
  9. heroku config:set MONGODB_URI='mongodb://heroku_pl3qcvnq'

Want add a heroku deploy button? Pull requests welcome :]

Project scheme
alt text

demo

demo

demo

demo

demo

demo

demo