Skip to content

Commit

Permalink
chore: update api url
Browse files Browse the repository at this point in the history
  • Loading branch information
rotimi-best committed Dec 3, 2024
1 parent 9b1b74b commit c5194ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: Deploy Frontend
runs-on: ubuntu-latest
env:
VITE_API_URL: https://naijastars-api.classroomio.com/api
VITE_API_URL: https://api.naijastars.dev/v1

permissions:
id-token: write # Needed for auth with Deno Deploy
Expand Down
6 changes: 3 additions & 3 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ const PORT = Number(Deno.env.get('PORT')) || 8000;
const app = new Hono();

/** MIDDLEWARES */
app.use('/api/*', cors());
app.use('/v1/*', cors());

app.get(
'/api/*',
'/v1/*',
cache({
cacheName: 'naijastars-api',
cacheControl: 'max-age=3600',
Expand All @@ -32,7 +32,7 @@ app.get('/', (c) => {
});

// Repository routes
app.route('/api', RepositoryHandler);
app.route('/v1', RepositoryHandler);

/** START THE SERVER */
console.log(`API server running on http://localhost:${PORT}`);
Expand Down

0 comments on commit c5194ff

Please sign in to comment.