Implementing APIs with Express.js
Let’s go over the architecture and file structure of our backend so that we get an understanding of how the server is bootstrapped, how routing is configured for API endpoints, how public resources are served, and how services are configured.
Review the file structure of our Express server:
server/src
├── api.ts
├── app.ts
├── config.ts
├── docs-config.ts
├── graphql
│ ├── api.graphql.ts
│ ├── helpers.ts
│ └── resolvers.ts
├── index.ts
├── models
│ ├── enums.ts
│ ├── phone.ts
│ └── user.ts
├── public
├── services
│ ├── authService.ts
│...