Skip to content

Commit 5debaec

Browse files
author
Your Name
committed
Stripe In Practice Course
1 parent 026fbf5 commit 5debaec

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/server.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ import {Application} from "express";
44
import {createCheckoutSession} from './checkout.route';
55
import {getUserMiddleware} from './get-user.middleware';
66
import {stripeWebhooks} from './stripe-webhooks.route';
7-
8-
7+
import * as cors from "cors";
98

109
export function initServer() {
1110

1211
const bodyParser = require('body-parser');
1312

1413
const app:Application = express();
1514

15+
app.use(cors());
16+
1617
app.route("/").get((req, res) => {
1718
res.status(200).send("<h1>API is up and running!</h1>");
1819
});

0 commit comments

Comments
 (0)