An example repository showing how to use Go with Nx.
This repositry contains:
- A Go Todo Application (API Server)
- A Go Todo Library
- Unit tests for the API Server
To build the application you run this command at the root of your workspace.
npx nx build
To serve the application, you run this command at the root of your workspace.
npx nx serve
Then you can navigate to http://localhost:8080/api/todos to your current list of todos.
All other API endpoints are at http://localhost:8080/api/todo. It uses HTTP verbs to determine the action to take. Only GET, POST, PUT, and DELETE are supported. Optionally, you can pass a query parameter id
to specify which todo to act on.
To run the unit test for the application, you run this command at the root of your workspace.
npx nx test