backend (Golang)
- install go from official website https://go.dev/
- set $GOROOT:/usr/local/go/bin & $GOPATH/src: ~/go/src
- run project_creator
to create new domain with CRUD operation and other prerequisite:
go get -u github.com/ar-mokhtari/orginfo-generator
cd ~/go/src &&
project_name="myproject" &&
mkdir -p -m777 $project_name/cli/generator &&
echo "package main
import \"github.com/ar-mokhtari/orginfo-generator\"
func main() {
generator.New()
}
" > $project_name/cli/generator/main.go &&
> $project_name/go.mod && cd $project_name/cli/generator && go mod tidy && go get -u github.com/ar-mokhtari/orginfo-generator && go build && export GO111MODULE="off" && go get ./. && export GO111MODULE="auto" && go mod tidy
cd go/src/$project_name/cli/generator/bin
./generator sub-command -domain_name="DOMAIN NAME" -fields="field1-string-field1_1,field2-uint-field1_2,..." && go mod tidy
run this for add a new domain:
./generator new -domain_name="DOMAIN_NAME" -fields="codeType-uint-code_type,code-uint-code" && go mod tidy
Also, to remove a domain run this:
./generator delete -domain_name="DOMAIN_NAME" && go mod tidy
./generator new -from_file && go mod tidy
./generator delete -from_file && go mod tidy
[
{
"domain_name": "string",
"fields": [
{
"name": "string",
"type": "string",
"json_name": "string"
}
]
}
]
generator.mp4
/docs/orginfo.postman_collection.json
for continue on existing repo:
cd existing_repo
git remote add origin `git address`
git branch -M main
git push -uf origin main
for clone
git clone [email protected]:ar-mokhtari/orginfo.git
for production, there is stable main branch:
git checkout main
for develop:
git checkout -b developing
after all, back to main:
git merge --no-ff developing
for detail see: docker-compose.yaml
docker compose up -d