Updated docs and minor cleanup
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
# Commands
|
||||
|
||||
```
|
||||
|
||||
5
docs/docs/command_plugins.md
Normal file
5
docs/docs/command_plugins.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
sidebar_position: 5
|
||||
---
|
||||
|
||||
# Command plugins
|
||||
@@ -1,21 +1,28 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Install
|
||||
|
||||
## Requirements
|
||||
|
||||
MycroForge has the following dependencies.
|
||||
|
||||
- bash
|
||||
- git
|
||||
- Python3 (3.10)
|
||||
- Docker
|
||||
- .NET 8
|
||||
|
||||
### Windows
|
||||
|
||||
To simplify the implementation of this tool, it assumes that it's running in a POSIX compliant environment.
|
||||
MycroForge has been developed and tested on Windows in WSL2 Ubuntu 22.04.03.
|
||||
So when running on Windows, it's recommended to run MycroForge in the same environment or atleast in a similar WSL2 distro.
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Getting started
|
||||
|
||||
## Requirements
|
||||
|
||||
MycroForge has the following dependencies.
|
||||
|
||||
- bash
|
||||
- git
|
||||
- Python3 (3.10)
|
||||
- Docker
|
||||
- .NET 8
|
||||
|
||||
### Windows
|
||||
|
||||
To simplify the implementation of this tool, it assumes that it's running in a POSIX compliant environment.
|
||||
MycroForge has been developed and tested on Windows in WSL2 Ubuntu 22.04.03.
|
||||
So when running on Windows, it's recommended to run MycroForge in the same environment or atleast in a similar WSL2 distro.
|
||||
|
||||
|
||||
### Install
|
||||
|
||||
```
|
||||
dotnet tool install -g MycroForge.CLI
|
||||
```
|
||||
@@ -167,16 +167,18 @@ Modify `TodoService.list`
|
||||
|
||||
```python
|
||||
# Before
|
||||
async with async_session() as session:
|
||||
stmt = select(Todo)
|
||||
results = (await session.scalars(stmt)).all()
|
||||
return results
|
||||
async def list(self) -> List[Todo]:
|
||||
async with async_session() as session:
|
||||
stmt = select(Todo)
|
||||
results = (await session.scalars(stmt)).all()
|
||||
return results
|
||||
|
||||
# After
|
||||
async with async_session() as session:
|
||||
stmt = select(Todo).options(selectinload(Todo.tags))
|
||||
results = (await session.scalars(stmt)).all()
|
||||
return results
|
||||
async def list(self) -> List[Todo]:
|
||||
async with async_session() as session:
|
||||
stmt = select(Todo).options(selectinload(Todo.tags))
|
||||
results = (await session.scalars(stmt)).all()
|
||||
return results
|
||||
```
|
||||
|
||||
Modify `TodoService.get_by_id`
|
||||
@@ -279,5 +281,6 @@ Modify `TodoService.update`
|
||||
return True
|
||||
```
|
||||
|
||||
At this point, the app should be ready to test.
|
||||
TODO: Elaborate!
|
||||
## Test the API!
|
||||
|
||||
Go to http://localhost:5000/docs and test your Todo API!
|
||||
Reference in New Issue
Block a user