Welcome to the API SERVER
This is the main page of the application.
Go to Client
Server Information
Security Features:
-
HTTP-only cookies
-
JWT authentication with Passport
-
Helmet for securing HTTP headers
-
CORS with dynamic origin checking
-
Rate limiting to prevent abuse
-
Session management with MongoDB store
Other Features:
Available Routes:
-
/api/users:
User management
-
/api/files:
File management
-
/api/crons:
Cron jobs management
-
/api/temp1:
Temperature sensor 1 data measurement
-
/api/ping:
Ping to wake up the server
Why Separate API Server and Client?
Designing an application with a separate API server and client offers several benefits:
- Separation of Concerns: By separating the backend (API server) and frontend (client), each
part can be developed, tested, and deployed independently. This makes the codebase more modular and easier
to maintain.
- Scalability: The API server can handle multiple clients, including web, mobile, and other
third-party applications. This architecture allows each component to scale independently based on its
specific needs.
- Security: The API server can implement robust security measures, such as authentication and
authorization, to protect sensitive data. The client only interacts with the API server, reducing the attack
surface.
- Flexibility: Different teams can work on the frontend and backend simultaneously, using
different technologies and frameworks. This allows for greater flexibility in choosing the best tools for
each part of the application.
- Performance: The API server can be optimized for data processing and business logic, while
the client can be optimized for user experience and interactivity. This separation can lead to better
overall performance.
This architecture is commonly used in modern web development to create robust, scalable, and maintainable
applications.