Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update readme #228

Merged
merged 2 commits into from
Jul 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 52 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,64 @@ Nitric SDKs provide an infrastructure-as-code style that lets you define resourc

You can request the type of access you need to resources such as publishing for topics, without dealing directly with IAM or policy documents.

## Status
- Reference Documentation: https://nitric.io/docs/reference/nodejs
- Guides: https://nitric.io/docs/guides/nodejs

The SDK is in early stage development and APIs and interfaces are still subject to breaking changes. We’d love your feedback as we build additional functionality!
## Usage

### Starting a new project

Install the [Nitric CLI](https://nitric.io/docs/getting-started/installation), then generate your project:

TypeScript:

```bash
nitric new hello-world ts-starter
```

JavaScript:

```bash
nitric new hello-world js-starter
```

### Adding to an existing project

First of all, you need to install the library:

```bash
npm install @nitric/sdk
```

Then you're able to import the library and create cloud resources:

```typescript
import { api, bucket } from '@nitric/sdk';

const publicApi = api('public');
const uploads = bucket('uploads').allow('write');

publicApi.get('/upload', async (ctx) => {
const photo = uploads.file('images/photo.png');

const url = await photo.getUploadUrl({
expiry: 300,
});

return ctx.res.json({ url });
});
```

## Learn more

Learn more by checking out the [Nitric documentation](https://nitric.io/docs).

## Get in touch:

- Ask questions in [GitHub discussions](https://github.com/nitrictech/nitric/discussions)
- Join us on [Discord](https://nitric.io/chat)

- Join us on [Discord](https://discord.gg/Webemece5C)
- Ask questions in [GitHub discussions](https://github.com/nitrictech/nitric/discussions)

- Find us on [Twitter](https://twitter.com/nitric_io)

- Send us an [email](mailto:[email protected])

## Get Started

Check out the [Nitric docs](https://nitric.io/docs) to see how to get started using Nitric.
Loading