Skip to content

refactor: Move routes into a dedicated Express Router #31

@AlAfiz

Description

@AlAfiz

Description

Right now, all our routes might be sitting directly in server.js. We should move them into a separate router file to keep the main file clean.

Requirements

  • Create a routes/api.js file.
  • Use express.Router() to define the endpoints (e.g., the tokens and prices routes).
  • Import and mount the router in server.js using app.use('/api/v1', apiRoutes).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions