Skip to content

Latest commit

 

History

History
70 lines (50 loc) · 2.91 KB

README.md

File metadata and controls

70 lines (50 loc) · 2.91 KB

Uevent (Server)

Node.js Express TypeScript MySQL Prisma JSON Web Tokens Nodemon Swagger Stripe

About

An event-booking application, written in Express.js, with the use of MySQL, Prisma & Stripe API.

Requirements & Dependencies

  • Node.js (version 16.17.1 or higher)
  • NPM (version 9.4.0 or higher)
  • MySQL
  • Stripe API

Setup & Run

Prior to setup, create an .env file based on the .env.example file, and fill in the required vars. Then proceed:

  • Install all the required dependencies, listed above.
  • Create a Stripe account and use the provided test API keys.
  • Run npm install in the api/ directory.
  • Run npm run migrate.
  • Run npm run dev.

You can now access the API, using the host and port, provided in the .env file.

Test Payments Locally

  • Install stripe-cli
  • Run stripe login
  • Run stripe listen --forward-to {{HOST}}:{{PORT}}/webhook
  • Use the generated webhook signing secret in your .env file.

Stripe payments will now be confirmed via the /webhook endpoint.

Test Stripe Connect

You can create & connect Stripe accounts via our platform in order to receive payments for paid events.

  • Make sure you have all the prerequisites completed.
  • Create a company using the client side.
  • Navigate to the edit menu of the company and click the Connect Stripe button.
  • Follow the further given instructions.

You can now view your Stripe account by clicking the Stripe Account button on the company page.

Note: If you don't complete & submit the form, the paid events won't be possible.

View the Swagger API Documentation

  • Make sure the server is running.
  • Go to {{HOST}}:{{PORT}}/docs in your web browser.