当前位置: 首页 > 软件库 > Web应用开发 > Web框架 >

frame

💡 A user system API starter
授权协议 MIT License
开发语言 JavaScript
所属分类 Web应用开发、 Web框架
软件类型 开源软件
地区 不详
投 递 者 沈飞翼
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

No longer maintained

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

Thanks for your interest in my projects.


Frame

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

Features

  • 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

Technology

Frame is built with the hapi framework. We'reusing 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, forkthis repo and build one on top of Frame.

Live demo

url username password
https://getframe.herokuapp.com/ root root
https://getframe.herokuapp.com/documentation

Postman is a great tool for testing anddeveloping APIs. See the wiki for details on how tologin.

Requirements

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

Installation

$ git clone https://github.com/jedireza/frame.git
$ cd frame
$ npm install

Configuration

Simply edit config.js. The configuration usesconfidence which makes it easy tomanage configuration settings across environments. Don't store secrets inthis file or commit them to your repository.

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

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

First time setup

WARNING: This will clear all data in the following MongoDB collections ifthey 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: jedireza@gmail.com
# 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 http://127.0.0.1:9000/ andsee the welcome message.

nodemon watches for changes in servercode 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://127.0.0.1:9229/3d706d9a-b3e0-4fc6-b64e-e7968b7f94d0
# For help see https://nodejs.org/en/docs/inspector
# 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 tochrome://inspect. See https://nodejs.org/en/docs/inspector/for more details.

Running in production

$ node server.js

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

  • NODE_ENV=production - This is important for many differentoptimizations.
  • NPM_CONFIG_PRODUCTION=false - This tells $ npm install to not skipinstalling devDependencies, which we may need to run the first timesetup script.

Have a question?

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

Want to contribute?

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

Running tests

Lab is part of the hapi ecosystem and what weuse 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 thetest-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

License

MIT

Don't forget

What you build with Frame is more important than Frame.

  • 关于 frame的一些基本知识 只是摘抄了一部分,供初学者参考。 b.帧速率:帧速率是每秒显示的图像数。标准影片(NTSC) 是29.97 帧第秒 (fps),电影是每秒24 帧fps。欧洲标准是(PAL) 25 帧fps。如果你对你影片的尺寸 不是太注重的话,保留默认的Current选项。这将会使你制作的影片的帧速率和源文件一致。不管怎样,如果你想降低带宽和CPU的占用,你可以选择一个低的帧 速

  • frame 和 iframe 的区别   1、frame 不能脱离 frameset 单独使用,iframe 可以;   2、frame 不能放到body中,否则将无法显示;   3、iframe 也可以嵌套在frameset ,但是必须放到body中,不嵌套在frameset 中的iframe 可以随意使用;   4、frame 的高度只能通过 frameset 控制,iframe 是自己本身控

  • 关于 frame的一些基本知识只是摘抄了一部分,供初学者参考。 b.帧速率: 帧速率是每秒显示的图像数。标准影片(NTSC) 是29.97 帧第秒 (fps),电影是每秒24 帧fps。欧洲标准是(PAL) 25 帧fps。如果你对你影片的尺寸 不是太注重的话,保留默认的Current选项。这将会使你制作的影片的帧速率和源文件一致。不管怎样,如果你想降低带宽和CPU的占用,你可以选择一个低的帧

  • ffmpeg中的av_read_frame()的作用是读取码流中的音频若干帧或者视频一帧。例如,解码视频的时候,每解码一个视频帧,需要先调用 av_read_frame()获得一帧视频的压缩数据,然后才能对该数据进行解码(例如H.264中一帧压缩数据通常对应一个NAL)。 对于视频的编解码来说,要对数据进行解码,那么首先要获取视频帧的压缩数据。 av_read_frame()的作用就是获取视频的数

  • 创建图形化界面 创建一个窗体 <-- 注:个人理解,如有错误,欢迎讨论 --> 1、在主函数中新建窗口 直接在主函数中写: Frame f = new Frame();//构造一个最初不可见的 Frame 新实例()。 f.setSize(500, 400);//设置窗口大小,宽度500,高度400 2、直接创建类继承frame public class 类名 extends Frame{ p

  • Code Is Never Die ! 问题: 在做iframe预览PDF文件时,虽然nginx配置了X-Frame-Options SAMEORIGIN,但在iframe中仍然获取不到内容。 介绍:X-Frame-Options HTTP 响应头是用来给浏览器指示允许一个页面可否在 frame , iframe 或者 object 中展现的标记。网站可以使用此功能,来确保自己网站的内容没有被嵌到

 相关资料
  • 介绍 (Introduction) Frame类是一个带有边框和标题的顶级窗口。 它使用BorderLayout作为默认布局管理器。 类声明 以下是java.awt.Frame类的声明: public class Frame extends Window implements MenuContainer 字段 (Field) 以下是java.awt.Frame类的字段: sta

  • 介绍 (Introduction) JFrame类是java.awt.Frame的扩展版本,它增加了对JFC/Swing组件体系结构的支持。 Class 声明 (Class Declaration) 以下是javax.swing.JFrame类的声明 - public class JFrame extends Frame implements WindowConstants, A

  • Frame小部件对于以某种方式友好的方式分组和组织其他小部件的过程非常重要。 它就像一个容器,负责安排其他小部件的位置。 它使用屏幕中的矩形区域来组织布局并提供这些小部件的填充。 框架也可以用作实现复杂小部件的基础类。 语法 (Syntax) 以下是创建此小部件的简单语法 - w = Frame ( master, option, ... ) 参数 (Parameters) master - 这

  • 在每一个时间点,页面通过 page.mainFrame() 和 frame.childFrames() 方法暴露当前框架的细节。 Frame 对象的生命周期由 3 个事件控制,它们通过 page 对象监听: 'frameattached' - 当框架被页面加载时触发。一个框架只会被加载一次。 'framenavigated' - 当框架改变URL时触发。 'framedetached' - 当框架

  • One - 一个极简的基于swoole常驻内存框架。 hello world 安装 composer create-project lizhichao/one-app appcd appphp App/swoole.php 测试 curl http://127.0.0.1:8081/ 主要功能 RESTful路由 中间件 websocket/tcp/http……任意协议路由 ORM模型 统一的se

  • A-Frame 是 Mozilla 开源的网页虚拟现实体验( WebVR )框架,可用于桌面、iPhone(即将支持安卓)以及 Oculus Rift。A-Frame 可以让创建 WebVR 体验变得更简单。 A-Frame 设计成 web 开发者很熟悉的模样。它封装了 WebGL 的功能到 HTML 自定义元素,所以创建一个高性能的虚拟现实体验就像下列代码那样简单: <html>  <head>