frame 正在参加 2021 年度 OSC 中国开源项目评选,请投票支持!
frame 在 2021 年度 OSC 中国开源项目评选 中已获得 {{ projectVoteCount }} 票,请投票支持!
2021 年度 OSC 中国开源项目评选 正在火热进行中,快来投票支持你喜欢的开源项目!
2021 年度 OSC 中国开源项目评选 >>> 中场回顾
frame 获得 2021 年度 OSC 中国开源项目评选「最佳人气项目」 !
授权协议 MIT License
开发语言 JavaScript
操作系统 跨平台
软件类型 开源软件
所属分类 Web应用开发Web框架
地区 不详
投 递 者 首席测试
适用人群 未知
收录时间 2021-11-30


No longer maintained

Boilerplates can be a huge time sink to maintain and I've decieded to archive this project.

Thanks for your interest in my projects.


A user system API starter. Bring your own front-end.

Build Status Dependency Status devDependency Status


  • Login system with forgot password and reset password
  • Abusive login attempt detection
  • User roles for accounts and admins
  • Admins only notes and status history for accounts
  • Admin groups with shared permissions
  • Admin level permissions that override group permissions


Frame is built with the hapi framework. We're using MongoDB as a data store.

Bring your own front-end

Frame is only a restful JSON API. If you'd like a ready made front-end, checkout Aqua. Or better yet, fork this repo and build one on top of Frame.

Live demo

url username password root root

Postman is a great tool for testing and developing APIs. See the wiki for details on how to login.


You need Node.js >=8.x and you'll need a MongoDB >=2.6 server running.


$ git clone
$ cd frame
$ npm install


Simply edit config.js. The configuration uses confidence which makes it easy to manage configuration settings across environments. Don't store secrets in this file or commit them to your repository.

Instead, access secrets via environment variables. We use dotenv to help make setting local environment variables easy (not to be used in production).

Simply copy .env-sample to .env and edit as needed. Don't commit .env to your repository.

First time setup

WARNING: This will clear all data in the following MongoDB collections if they exist: accounts, adminGroups, admins, authAttempts, sessions, statuses, and users.

$ npm run first-time-setup

# > frame@0.0.0 first-time-setup /home/jedireza/projects/frame
# > node first-time-setup.js

# MongoDB URL: (mongodb://localhost:27017/frame)
# Root user email:
# Root user password:
# Setup complete.

Running the app

$ npm start

# > frame@0.0.0 start /home/jedireza/projects/frame
# > ./node_modules/nodemon/bin/nodemon.js -e js,md server

# 09 Sep 03:47:15 - [nodemon] v1.10.2
# ...

Now you should be able to point your browser to and see the welcome message.

nodemon watches for changes in server code and restarts the app automatically.

With the debugger

$ npm run inspect

# > frame@0.0.0 inspect /home/jedireza/projects/frame
# > nodemon --inspect -e js,md server.js

# [nodemon] 1.14.12
# [nodemon] to restart at any time, enter `rs`
# [nodemon] watching: *.*
# [nodemon] starting `node --inspect server.js`
# Debugger listening on ws://
# For help see
# 180203/193534.071, [log,info,mongodb] data: HapiMongoModels: successfully connected to the db.
# 180203/193534.127, [log,info,mongodb] data: HapiMongoModels: finished processing auto indexes.
# Server started on port 9000

Once started with the debuger you can open Google Chrome and go to chrome://inspect. See for more details.

Running in production

$ node server.js

Unlike $ npm start this doesn't watch for file changes. Also be sure to set these environment variables in your production environment:

  • NODE_ENV=production - This is important for many different optimizations.
  • NPM_CONFIG_PRODUCTION=false - This tells $ npm install to not skip installing devDependencies, which we may need to run the first time setup script.

Have a question?

Any issues or questions (no matter how basic), open an issue. Please take the initiative to read relevant documentation and be pro-active with debugging.

Want to contribute?

Contributions are welcome. If you're changing something non-trivial, you may want to submit an issue before creating a large pull request.

Running tests

Lab is part of the hapi ecosystem and what we use to write all of our tests.

$ npm test

# > frame@0.0.0 test /home/jedireza/projects/frame
# > lab -c -L

#  ..................................................
#  ..................................................
#  ..................................................
#  ..............

# 164 tests complete
# Test duration: 14028 ms
# No global variable leaks detected
# Coverage: 100.00%
# Linting results: No issues

Targeted tests

If you'd like to run a specific test or subset of tests you can use the test-server npm script.

You specificy the path(s) via the TEST_TARGET environment variable like:

$ TEST_TARGET=test/server/web/main.js npm run test-server



Don't forget

What you build with Frame is more important than Frame.



评论 (0)

2020/12/08 12:40


```javascript //刷新frame 通过和替换iframe的src来实现局部刷新 parent.document.getElementById("whole_Frame").src = '${ctx}/apAnalysis/analysisWhole?pageNo='+p; //刷新父级frame11, parent.frame11.location.reload() document.frames("frameName").location.reload(); 语句1. window.parent.frames[1].location.reload(); 语句2. window.parent.frames.bottom.location.reload(); 语句3. window.parent.frames["bott...

2014/09/18 21:32

frame 和 bounds

frame : 包含四个参数 矩形区域左上角的XY坐标, 矩形区域的宽和高 frame 是相对于父视图的坐标原点的位置. bounds: 包含四个参数:矩形区域左上角的坐标 , 矩形区域的宽和高 , 但是x 和y是相对于自身坐标的坐标原点的距离. 默认矩形区域左上角的点和自身坐标系的坐标原点重合 . blueView.bounds = CGRectMake(-20, -20, 200, 200); 变得是坐标原点. 修改bounds左上角的位置,会影响自身坐标系的坐标原点的位置, 自身视图的位置不会...

2015/04/30 10:59

else for every frame. It added

Artist Allison Schulnik About Her New Claymation Video for Grizzly Bear Schulnik comes from an arty San Diego family (mom, aunt, uncle are painters; dad is an architect; cousin a cartoonist) and studied claymation in the experimental animation program under Jules Engel at CalArts. Following graduation she worked for several years for commercial animation studios, waiting for Black Strass Anna 1...

0 评论
0 收藏