Comments (1)
🤖
Hello @shenqidebaozi,
I'm here to assist you with your question about creating a Kratos project. Here's a step-by-step guide on how to do it:
- Install the
kratos
tool:
go get -u github.com/bilibili/kratos/tool/kratos
- Navigate to the
src
directory in yourGOPATH
:
cd $GOPATH/src
- Create a new project:
kratos new kratos-demo
- If you want to specify the owner and path, use the
-o
and-d
options respectively:
kratos new kratos-demo -o YourName -d YourPath
- To generate example code for
grpc
andbm
defined by protobuf, add the--proto
option:
kratos new kratos-demo -o YourName -d YourPath --proto
- Navigate to the
cmd
directory in your project:
cd kratos-demo/cmd
- Build and run your project:
go build
./cmd -conf ../configs
- Open your browser and visit: http://localhost:8000/kratos-demo/start. You should see the output
Golang 大法好 !!!
.
Please note that you need to have Go installed on your system (version 1.12 or higher) and the GO111MODULE
environment variable set to on
. You also need to have the Protobuf Compiler, Go Protobuf Generator, and Swagger Docs installed.
For more detailed information, you can refer to the Kratos Tools and Kratos Getting Started documentation.
I hope this helps! If you have any more questions, feel free to ask.
Best,
Dosu
Sources
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
from kratos.
Related Issues (20)
- Request context canceled during graceful shutdown HOT 3
- [Question]How to do unit testing? HOT 5
- [Question] How to make kratos grpc transfer data larger than 4MB in size ? HOT 4
- The service startup error could not be printed correctly HOT 1
- [Question] The rules before and after loading the configuration file are inconsistent. Can they be improved? HOT 8
- How to print out all request routes, including intercepted or intercepted requests without content type HOT 3
- [Feature] Whether to consider supporting Filebeat access HOT 3
- errors had been ignore or covered when too much err happend HOT 1
- proto. When the field of the query string passed by the front end is an empty string, the field parsed by the back end is nil. HOT 3
- Add a scheduled task server, dependency injection error HOT 3
- [Question] In the parameter verification section of the middleware in the official kratos documentation, the makefile instruction "Add the validate command in the Makefile" will report an error when copied. HOT 2
- logging.Server prints a wrong caller path HOT 1
- EncodeURL will ignore some fields if request message contains repeated custom message HOT 11
- [Question] Usage about selector peer HOT 3
- [Question] Why doesn’t Consul use the official watch for monitoring? HOT 4
- [Question] http API returns json parameter name not as expected HOT 7
- In version 1.0.0, Mergo moves to a vanity URL: dario.cat/mergo. Can update to the latest version? HOT 6
- How to configure when dealing with multiple DB instances? Are there any practices?[Question] HOT 5
- [Question]Why kratos load yaml as json and unmarshal to struct HOT 1
- 使用openapiv2,出现protoc-gen-openapiv2/options/annotations.proto: File not found. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kratos.