Git Product home page Git Product logo

daprme's Introduction

daprme

Go Report Card Test Release codecov

This new app wizard CLI guides you through the creation of a new Dapr project. Including the Dapr component selection and scaffolding of a new application.

Currently supported application types:

  • Command-line (e.g. CLI)
  • HTTP Service
  • gRPC Service

Each one of these applications supports options have client to call into Dapr API

Currently supported development languages:

  • Go
  • Node.js (under development)

The daprme wizard is template driven, PRs with support for other languages welcomed

Installation

Mac OS using Homebrew

brew tap dapr-templates/daprme
brew install dapr-templates/daprme/daprme

Other

  1. Download the latest daprme release for your OS
  2. Move it to your desired in PATH location (e.g. /usr/local/bin)

Usage

Assuming the daprme CLI is already in PATH (see Installation above)

Run daprme and follow the prompts

daprme

To specify the output directory (defaults to current), provide the --out flag, for example:

daprme --out ~/Downloads

To re-use an existing app manifest provide the --file flag, for example:

daprme --file ~/dapr-templates/my-common-app.yaml

Here is an example of an app template for a gRPC service application type in Go with a couple of components:

The daprme prompt will guide you through template definition and output resulting manifest at the end, so no need to write any YAML by hand.

Meta:
  Name: demo
  Type: gRPC
  Lang: go
  Main: main.go
  Port: 50050
  UsesClient: true
  Owner: mchmarny
PubSubs:
- Type: pubsub.redis
  Name: redis-pubsub
  Topic: messages
Bindings:
- Type: bindings.cron
  Name: cron-binding
Services:
- Name: myService
- Name: myOtherService
Components:
- Type: secretstores.local.env
  Name: localenv-secret
- Type: state.redis
  Name: redis-store

Adding Language Support

To learn about ways you can contribute and how to setup your development environment check the CONTRIBUTING.md doc.

The best place to start is adding support for additional languages. daprme is uses Go templating, so adding addition language support is as simple as providing language specific templates in the template directory. In the template, you can use any value from the context daprme passes to these templates.

In addition, you will need to implement the language specific provider interface Configurable in pkg/lang package. It lists the templates and provides language specific configuration.

When possible, aim for runnable project vs advanced features that require users to perform additional "plumbing" steps.

Code of Conduct

Please refer to our included Code of Conduct

daprme's People

Contributors

mchmarny avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.