project template use to create simpleapp project
Refer https://github.com/SIMITGROUP/simpleapp-generator to know what is simpleapp-generator
- install simpleapp-generator
npm install -g @simitgroup/simpleapp-generator@latest
- edit config.json for your environment
{
"definationsFolder":"./definations",
"backendFolder":"./backend",
"backendPort":"8000",
"mongoConnectStr":"mongodb://localhost:27017/admin?authMechanism=DEFAULT",
"frontendFolder":"./frontend",
"frontendPort":"8080",
"openapi3Yaml":"./openapi.yaml",
"keycloaksetting":{
"OAUTH2_BASEURL":"https://keycloak-server-url",
"OAUTH2_REALM":"realm-name",
"OAUTH2_CONFIGURL":"https://keycloak-server-url",
"OAUTH2_CLIENTID":"client-id",
"OAUTH2_CLIENTSECRET":"client-secret-value",
"AUTH_SECRET_KEY":"my-secret-key"
}
}
- Run generator for first time to generate frontend (nuxt), backend (nest) project
sh start-fresh.sh
It will take quite sometimes until you can access backend: http://localhost:8000/api (with multiple microservices ready) frontend: http://localhost:8080 (it redirect you to keycloak login page)
Ctrl-c
to stop the cli, future start frontend and backend separately
cd backend
pnpm start:dev
cd frontned
pnpm dev
- edit or add file in
definations
folder - use vscode to edit generated code:
- backend/src/docs/*
- frontend/pages/[xorg]/*
- when you wish to regenerate source code, then run:
sh regenerate.sh