# poom-cors

> Cross-Origin Resource Sharing(CORS) for poom

Latest version **1.0.1** (published 2019-03-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install poom-cors
pnpm add poom-cors
yarn add poom-cors
bun add poom-cors
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-03-15 |
| First published | 2018-10-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| Author | onapis.com@gmail.com |
| Maintainers | onapis |

## Links

- npm: https://www.npmjs.com/package/poom-cors
- npm.io page: https://npm.io/package/poom-cors

## Dependencies (1)

- [poom-log](https://npm.io/package/poom-log.md) ^1.0.3

## Recent versions

- 1.0.1 (latest) — 2019-03-15
- 1.0.0 — 2019-01-29
- 0.0.1 — 2018-10-14

## README

# poom-cors
Cross-Origin Resource Sharing(CORS) for poom
A plugin helps to resolve cross domain for XHR request

# Install
```nodejs
npm i poom-cors -S
```

# Examples

### Typescript
```nodejs
import { Server } from 'poom';
import { route } from 'poom-route';
import { serve } from 'poom-serve';
import { cors } from 'poom-cors';

Server.use(serve({
    '/upload': path.join(__dirname, '..', 'assets', 'upload')
}));
Server.use(cors());
Server.use(route(path.join(__dirname, 'controller')));
```

### Javascript
```nodejs
const poom = require("poom");
const poomRoute = require("poom-route");
const poomServe = require("poom-serve");
const poomCors = require("poom-cors");

poom.Server.use(poomServe.serve({
    '/images': path.join(__dirname, 'path to folder which contains resource files'),
    '/files': path.join(__dirname, 'path to folder which contains resource files'),
}));
poom.Server.use(poomCors.cors());
poom.Server.use(poomRoute.route(path.join(__dirname, 'controller')));
```

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