# user-profile-mongo

> 使用MongoDB保存用户信息

Latest version **1.1.1** (published 2015-04-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install user-profile-mongo
pnpm add user-profile-mongo
yarn add user-profile-mongo
bun add user-profile-mongo
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2015-04-24 |
| First published | 2015-04-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | na57@qq.com |
| Maintainers | na57 |

## Links

- npm: https://www.npmjs.com/package/user-profile-mongo
- Repository: https://github.com/nagucc/user-profile-mongo
- Issues: https://github.com/nagucc/user-profile-mongo/issues
- npm.io page: https://npm.io/package/user-profile-mongo

## Dependencies (2)

- [mongodb](https://npm.io/package/mongodb.md) ^1.4.31
- [node-uuid](https://npm.io/package/node-uuid.md) ^1.4.2

## Recent versions

- 1.1.1 (latest) — 2015-04-24
- 1.1.0 — 2015-04-24
- 1.0.1 — 2015-04-23
- 1.0.0 — 2015-04-22

## README

# user-profile-mongo
使用MongoDB保存用户数据

## 安装

`npm install user-profile-mongo`

## Profile 结构
```

{
	crendential: {...}, 	// 记录用户的唯一标识信息，例如userid等
	data:{...}				// 保存用户数据
}

```

## 示例

```
var Profile = require('../models/profile')('your db conn', 'collection_name'); // colllection_name默认为'profiles'

// 插入新用户：
Profile.updateUser(null, profile, callback);

// 更新已有用户数据：
Profile.updateUser(id, profile, callback);

// 获取用户数据：
Profile.getUser(userCrendential, callback);

```

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