Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added deno API to react app
  • Loading branch information
imadibrahimk committed Nov 14, 2023
commit d049d689ca3e362e14bf71ff02604f25d1008adb
4 changes: 2 additions & 2 deletions backend/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { fetchAirtableData } from "./util/AirtablUtil.ts"

// Create a new Oak application
const app = new Application();
// const PORT = 8000;
const PORT = Deno.env.get("PORT");
const PORT = 8000;
// const PORT = Deno.env.get("PORT");

// Enable CORS for all routes
app.use(oakCors());
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ function App() {
const fetchRecords = async () => {
try {
// Fetch data from the server
const response = await fetch('http://localhost:8000/records');
// const response = await fetch('http://localhost:8000/records');
const response = await fetch('https://tinker-backend-bbjncdnbpby9.deno.dev/records');


// Throw an error if the response is not ok
if (!response.ok) {
Expand Down