├── Procfile ├── .gitignore ├── public ├── lang-logo.png ├── stylesheets │ └── main.css └── node.svg ├── README.md ├── simplify.js ├── pg.sql ├── app.json ├── views ├── pages │ ├── db.ejs │ ├── index.ejs │ └── card-token.ejs └── partials │ ├── header.ejs │ └── nav.ejs ├── db.js ├── curl.sh ├── package.json ├── payments.js ├── customers.js └── index.js /Procfile: -------------------------------------------------------------------------------- 1 | web: node index.js 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | Dockerfile 4 | docker-compose.yml 5 | .idea/ 6 | *.iml 7 | .env 8 | -------------------------------------------------------------------------------- /public/lang-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/simplify-node-server/master/public/lang-logo.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Simplify SDK module on Heroku node instance 2 | 3 | ## Deploying to Heroku 4 | 5 | ``` 6 | $ heroku create 7 | $ git push heroku master 8 | $ heroku open 9 | ``` 10 | -------------------------------------------------------------------------------- /simplify.js: -------------------------------------------------------------------------------- 1 | var Simplify = require("simplify-commerce"); 2 | 3 | 4 | exports.client = Simplify.getClient({ 5 | publicKey: process.env.SIMPLIFY_API_PUBLIC_KEY, 6 | privateKey: process.env.SIMPLIFY_API_PRIVATE_KEY 7 | }); 8 | -------------------------------------------------------------------------------- /pg.sql: -------------------------------------------------------------------------------- 1 | create table customers(id varchar(15) primary key, name varchar (50), email varchar (100)); 2 | 3 | create table payments(id varchar(15) primary key, customer_id varchar (50) references customers(id), amount integer not null, status varchar (50)); 4 | 5 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Node.js Getting Started", 3 | "description": "A barebones Node.js app using Express 4", 4 | "repository": "https://github.com/heroku/node-js-getting-started", 5 | "logo": "http://node-js-sample.herokuapp.com/node.svg", 6 | "keywords": ["node", "express", "static"], 7 | "image": "heroku/nodejs" 8 | } 9 | -------------------------------------------------------------------------------- /views/pages/db.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | <% include ../partials/header.ejs %> 5 | 6 | 7 | 8 | 9 | <% include ../partials/nav.ejs %> 10 | 11 |
15 |
16 | This is a sample Node application deployed to Heroku. It's a reasonably simple app - but a good foundation for understanding how to get the most out of the Heroku platform.
18 | Getting Started with Node 19 | Source on GitHub 20 |