Skip to content

Folder Structure

Skitsanos edited this page Jan 22, 2023 · 1 revision

The folder structure of Foxx Builder is designed to make it easy for developers to organize and manage their API application architecture. At the core of this structure is the /routes folder, where developers can create their API service handlers using a simple convention. The /builder folder contains the Foxx Builder service and its utilities, which handle the mapping of routes and other tasks necessary for the service to run smoothly. This allows developers to focus on writing the actual service handlers without worrying about the underlying infrastructure.

Foxx Builder uses a simple and intuitive folder structure to organize your API endpoints. The "routes" folder is where you will create your API service handlers, with each endpoint being represented by a file named after the corresponding HTTP verb. For example, a file named "get.js" would handle GET requests to the endpoint, while a file named "post.js" would handle POST requests. This allows for a clear separation of concerns and easy management of your API's endpoints. Additionally, the "builder" folder contains the Foxx Builder service and its utilities, which handle the routing and mapping of the endpoint handlers. Unless you want to modify the behavior of Foxx Builder, this folder can be left alone. The manifest.json and setup.js files are also important for setting up and configuring your service. Overall, the folder structure is designed to be minimal and easy to understand, making it simple to manage and maintain your Foxx services.

src/
-- /builder/
---- context-extensions.js
---- index
-- /routes/
---- /login/
------ post.js
-- index.js
-- setup.js
manifest.json
package.json
Clone this wiki locally