Manifold是帮助开发人员查找和管理使用基础云服务的最简单工具。提供在一个平台上使用任何云端使用您喜欢的服务的自由,因此不再需要为了易用性而牺牲质量。无论是新手,经验丰富的还是开发团队的开发人员,都应该尝试Manifold。如今的现代开发人员需要汇集越来越多的基本服务来支持他们的应用程序,从存储和计算到日志记录和电子邮件。更重要的是,他们需要跨云使用这些服务。 Manifold让开发人员可以自由地在任何云上使用他们喜欢的服务,因为没有人应该为了易用性而牺牲质量。

Original: https://docs.manifold.co/docs/quickstart-guide-6G2IZEjhD20oK6iISoQOE6

Quickstart

Manifold simplifies the modern development workflow enabling you to find, manage and share developer services across teams and projects.

In this guide you will learn how to:

Remember to create a free Manifold account before getting started.

Getting started

Manifold will work regardless of your preferred stack, but in this introduction we are going to load up a simple application that sends logs to a LogDNA resource.

First, install the CLI tool locally by running the appropriate command(s) in your terminal:

MAC (HOMEBREW)

brew install manifoldco/brew/manifold-cli

WINDOWS/LINUX

curl -o- https://raw.githubusercontent.com/manifoldco/manifold-cli/master/install.sh | sh

EXAMPLE REPO

We also have a simplified Node.js app that talks to LogDNA to see Manifold in action. This page will reference that application. To download the code, run in a terminal window (replace ~/code/ with whatever folder on your system you prefer):

git clone git@github.com:manifoldco/manifold-quickstart ~/code/manifold-quickstart
cd ~/code/manifold-quickstart
npm i

Remix on Glitch

Create a project

To start, create a project by clicking + New next to Projects in the sidebar or from your home page (Note: you may see a list of resources when signing in for the first time.).

Most of our users use projects as app environments (e.g.: myapp-prod and myapp-stage). When creating a new project, give it a name and click Create.

MORE INFO

Create a resource

We’ll add a LogDNA instance to send logs from our application. From within a project, you can click + Add a new resource (you can also click + New next to Other Resources in the sidebar from anywhere, and select a project from the creation screen).

Find LogDNA on the page (you can filter by the “Logging” category up top) and click “Try Free.” Select the free plan, then scroll to the bottom of the page. Give your resource a name, make sure it’s in the right project, then click Create to be taken to the details page.

MORE INFO

Grab credentials with manifold run

With our resource launched, our app needs its credentials. We can grab the latest credentials by prefixing our server command with manifold run if you installed the CLI from the first step:

manifold run --project my-project [server start command]

If you’re not logged in, it will prompt you to log in with manifold login (or manifold --oauth github if you chose to authenticate with GitHub).

In the case of our example Node app, we’d access that with the following:

cd ~/code/manifold-quickstart
manifold run --project my-project 'npm run start'

Tip: the quotes help if your server command requires arguments.

If you’re taking advantage of Manifold Teams, your entire team only needs a server restart with manifold run to grab the latest keys when credentials are refreshed or services are added. No manual .env management necessary.

MANUAL ALTERNATIVE

If manifold run won’t work for your setup (If so, email us! We’re here to make your workflow better and love suggestions!), you can manually manage credentials by exporting a .envfile.

MORE INFO

Advanced resource management

When you clicked that Create button for LogDNA, Manifold did all the work of setting up your account for you! From the resource page, click Open LogDNA Dashboard to take you to your account for this resource.

Finishing up

Our sample app, now equipped with manifold run, sends anything you type in the input field to LogDNA. Placing our app on the left next to LogDNA’s dashboard on the right confirms our app is successfully submitting logs.

WHAT’S NEXT

 

打赏

Leave a Reply

Your email address will not be published. Required fields are marked *