# @trellisorg/nx-realm

> For building and deploying MongoDB Realm apps

Latest version **0.0.4** (published 2020-07-24) · 0 weekly downloads

## Install

```sh
npm install @trellisorg/nx-realm
pnpm add @trellisorg/nx-realm
yarn add @trellisorg/nx-realm
bun add @trellisorg/nx-realm
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2020-07-24 |
| First published | 2020-07-19 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 20.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | yharaskrik |

## Links

- npm: https://www.npmjs.com/package/@trellisorg/nx-realm
- npm.io page: https://npm.io/package/@trellisorg/nx-realm

## Dependencies (2)

- [rxjs](https://npm.io/package/rxjs.md) ^6.5.5
- [@angular-devkit/schematics](https://npm.io/package/@angular-devkit/schematics.md) ^9.1.9

## Recent versions

- 0.0.4 (latest) — 2020-07-24
- 0.0.3 — 2020-07-21
- 0.0.2 — 2020-07-20
- 0.0.1 — 2020-07-19

## README

# nx-realm

For building and deploying MongoDB Realm apps

# Generating an app

`yarn nx g @trellisorg/nx-realm:app`

It will ask you some basic questions to fill in the root `config.json`. You may need to enter in some other depending on your setup.

# Building

Same as with any other Nx app
`yarn nx build <project name>`

You can then deploy using the Realm CLI until this package supports deploying.

# Using Realm globals

Realm provides some globals that are available in the environment that TypeScript will not know about.

Typings for the following are included in nx-realm

1. `utils` - https://docs.mongodb.com/realm/functions/utilities/
2. `http` - https://docs.mongodb.com/realm/services/http/
3. `db` -  Access to the MongoDB Database attached to your application
4. `context' - https://docs.mongodb.com/realm/functions/context/

These can be used by declaring at the top of your functions `source.ts` file the following:

```
declare var db: Db;
declare var http: Http;
declare var utils: Utils;
declare var context: Context;
```

Where the types are imported from `@trellisorg/nx-realm`

Note: some of these typings may be incomplete please open a PR or an Issue with missing typings.

---
_Source: https://npm.io/package/@trellisorg/nx-realm · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
