Posts CRUD
This commit is contained in:
@@ -8,6 +8,7 @@ import { fileURLToPath } from 'url';
|
||||
import { dirname } from 'path';
|
||||
import dotenv from 'dotenv';
|
||||
import authRoutes from './routes/auth.js';
|
||||
import postRoutes from './routes/posts.js';
|
||||
|
||||
// Load environment variables
|
||||
dotenv.config();
|
||||
@@ -45,11 +46,7 @@ await app.register(fastifyStatic, {
|
||||
|
||||
// Register routes
|
||||
await app.register(authRoutes);
|
||||
|
||||
// Testing route
|
||||
app.get('/', async (request, reply) => {
|
||||
return { hello: 'world' }
|
||||
});
|
||||
await app.register(postRoutes);
|
||||
|
||||
// Start the server
|
||||
const start = async () => {
|
||||
|
||||
Reference in New Issue
Block a user