Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup Backend with Express and TypeScript #14

Closed
valon-loshaj opened this issue Oct 24, 2024 · 1 comment · Fixed by #32
Closed

Setup Backend with Express and TypeScript #14

valon-loshaj opened this issue Oct 24, 2024 · 1 comment · Fixed by #32
Assignees

Comments

@valon-loshaj
Copy link
Owner

valon-loshaj commented Oct 24, 2024

Set up the backend in the backend/ folder using Express and TypeScript. Include basic folder structure and routing.

Tasks:

  1. Initialize a new package.json in the backend/ folder:
    cd backend
    npm init -y
  2. Install dependencies for Express and TypeScript:
    npm install express
    npm install typescript ts-node-dev @types/express
  3. Set up the TypeScript configuration (tsconfig.json) and a basic Express server in backend/src/server.ts.
  4. Add a basic route /api/status that returns a simple JSON response { status: "OK" }.
  5. Add ts-node-dev to the package.json to enable live reload during development.
  6. Set up basic folder structure:
    backend/
    ├── src/
    │   ├── controllers/    # Express route handlers
    │   ├── models/         # Models (e.g., Prisma models)
    │   ├── routes/         # Route definitions (e.g., /api/auth, /api/tasks)
    │   └── server.ts       # Express server entry point
    └── package.json        # Backend dependencies
    
@valon-loshaj valon-loshaj converted this from a draft issue Oct 24, 2024
@valon-loshaj valon-loshaj self-assigned this Nov 10, 2024
@valon-loshaj
Copy link
Owner Author

Tasks:

  1. Configure Express.js with TypeScript
  2. Set up basic middleware (cors, body-parser)
  3. Create initial API route structure
  4. Implement basic health check endpoint
  5. Set up error handling middleware
  6. Configure basic logging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant