Feathers-Vue

授权协议 MIT License
开发语言 JavaScript
所属分类 Web应用开发、 常用JavaScript包
软件类型 开源软件
地区 不详
投 递 者 东门晨
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Feathers-Vue

A Vue 2 and FeathersJS 2 fullstack app with authentication, email verification, and email support."

About

This project uses Feathers. An open source web framework for building modern real-time applications and Vue 2 with Server Side Rendering.

This project is not finished but if you are can be ready to use if you are content with what it offers.

Features

  • SASS
  • Stylus
  • Pug
  • ES6, ES7, and ES8
  • Webpack
  • Vue Stash - For Redux Store
  • Bootstrap
  • Lodash
  • jQuery
  • FontAwesome
  • Validate client side data with mongoose schemas

Getting Started

Getting up and running is as easy as 1, 2, 3, 4.

There are multiple ways to start/develop the app.

Develop with docker

Don't install node_modules locally

  1. Create a environment-dev.env and environment.env file to hold your environment variables. These files are ignored by git. You'll want a DATABASE_URL and you gmail info for email verification
DATABASE_URL=mongodb://db/feathersvuedevelopment
COMPLAINT_EMAIL=your_email@gmail.com
GMAIL=your_email@gmail.com
GMAIL_PASSWORD=your_pass_password

See How to set an app password

  1. Run npm start
npm start
  1. To see production build locally
npm run build-qa
npm run qa
  1. To switch back to development use
npm run build-dev
npm start

Switching contexts between production and development requires a full docker build with no cache.

Develop without docker

  1. Make sure you have NodeJS and npm installed.

  2. Install your dependencies

    cd path/to/Feathers-Vue; npm install
    
  3. Start your app locally

    mongod
    
    npm run dev
    
  4. In production run

    npm run build
    npm run production
    

If you want emails to work using gmail add the following environment variables

export GMAIL=yourgmailaccount@gmail.com
export GMAIL_PASS=yourpassword or app-password

See How to set an app password

Testing

Simply run npm test and all your tests in the test/ directory to run server side unit test or run npm run integration to run client side side tests.

Scaffolding

Feathers has a powerful command line interface. Here are a few things it can do:

$ npm install -g feathers-cli             # Install Feathers CLI

$ feathers generate service               # Generate a new Service
$ feathers generate hook                  # Generate a new Hook
$ feathers generate model                 # Generate a new Model
$ feathers help                           # Show all commands

Help

For more information on all the things you can do with Feathers visit docs.feathersjs.com.

Looking for mobile?

I'm working on a cordova starter with feathers 2, Vue 2, and Framework 7. Visit the cordova branch of this repo.

Cordova Branch

Gitlab Auto Deployment

  1. Create a digitalocean instance from using the one-click docker instance.
  2. ssh into the instance and run
  sudo apt-get update
  sudo apt-get upgrade
  sudo apt-get -y install python-pip
  sudo pip install docker-compose
  1. Edit sshd_config
  nano /etc/ssh/sshd_config
  1. At the bottom of the file change PasswordAuthentication
  PasswordAuthentication yes
  1. Run reload ssh
  2. Set the secret environment variables in gitlab
  DATABASE_URL=mongodb://db/feathersvue
  DEPLOYMENT_SERVER_IP=your_ip_address
  DEPLOYMENT_SERVER_PASS=your_user_password
  DEPLOYMENT_SERVER_USER=your_server_user
  1. Update docker-compose.autodeploy.yml web image to point to your hosted image.
  2. Update gitlab-ci.yml in the only sections to only run on the branches you want to deploy from.
  3. Push changes in git to gitlab.

Breaking Changes

  • Removed mongoose validation from client side and replaced with Yup.
  • Reconstructed server-side rendering to use updated instructions in vuejs.
  • Moved server-entry file into app.

License

Copyright (c) 2016

Licensed under the MIT license.

  • 羽毛-vuex (feathers-vuex) feathers-vuex is a first class integration of the Feathers Client and Vuex. It implements many Redux best practices under the hood, eliminates a lot of boilerplate code, and st

  • Vue 中的Mixin对编写函数式风格的代码很有用,因为函数式编程就是通过减少移动的部分让代码更好理解(引自 Michael Feathers )。Mixin允许你封装一块在应用的其他组件中都可以使用的函数。如果使用姿势得当,他们不会改变函数作用域外部的任何东西,因此哪怕执行多次,只要是同样的输入你总是能得到一样的值,真的很强大! export const toggle = { data()

  • 先了解什么是MVX框架模式? MVX框架模式:MVC+MVP+MVVM 1.MVC:Model(模型)+View(视图)+controller(控制器),主要是基于分层的目的,责任分层,各自分工。 View通过Controller来和Model联系,Controller是View和Model的协调者,View和Model不直接联系,基本联系都是单向的。 2.MVP:是从MVC模式演变而来的,都是通

  • 一个很常见的场景: 有两个非常相似的组件, 它们拥有非常相似的基本功能, 但是它们之间又有足够的不同的地方, 该如何选择呢? 我们是应该将它们分成两个完全不同的组件呢? 还是创建一个基础组件, 然后定义足够多的props以方便区分使用场景? 转载http://hjingren.cn/2017/09/12/%E5%9C%A8Vue-js%E4%B8%AD%E4%BD%BF%E7%94%A8Mixin

  • 1.mixins: 这个属性是个数组,也就是说可以加载多个 minxin 文件。 mixins中的方法是完成业务逻辑。所以在组件的生命周期中都会添加 this.handlePlaylist() 方法。 这样就可以减少一部分代码。 Vue的Mixins是非常实用的编程方式, 因为最终实用的编程是通过不断减少运动部件(moving parts)使代码变得容易理解. (关于这一点, Michael Fe

  • 本文和大家分享的主要是 在Vue.js 中使用 Mixins相关内容,一起来看看吧,希望对大家 学习Vue.js 有所帮助。   一个很常见的场景:  有两个非常相似的组件 ,  它们拥有非常相似的基本功能 ,  但是它们之间又有足够的不同的地方 ,  该如何选择呢 ?  我们是应该将它们分成两个完全不同的组件呢 ?  还是创建一个基础组件 ,  然后定义足够多的 props 以方便区分使用场景

  • 这次给大家带来Vue.js中使用Mixins步奏详解,Vue.js中使用Mixins的注意事项有哪些,下面就是实战案例,一起来看一下。 一个很常见的场景: 有两个非常相似的组件, 它们拥有非常相似的基本功能, 但是它们之间又有足够的不同的地方, 该如何选择呢? 我们是应该将它们分成两个完全不同的组件呢? 还是创建一个基础组件, 然后定义足够多的props以方便区分使用场景? 这两种方式都不是完美的

  • 常见场景 有两个非常相似的组件,他们的基本功能是一样的,但他们之间又存在着足够的差异性,此时的你就像是来到了一个分岔路口:我是把它拆分成两个不同的组件呢?还是保留为一个组件,然后通过props传值来创造差异性从而进行区分呢? 两种解决方案都不够完美:如果拆分成两个组件,你就不得不冒着一旦功能变动就要在两个文件中更新代码的风险,这违背了 DRY 原则。反之,太多的props传值会很快变得混乱不堪,从

 相关资料
  • Feathers是一个为将来应用程序准备的实时JavaScript框架。 开始安装 你可以仅利用4个命令建立第一个实时API: $ npm install -g yo generator-feathers$ mkdir my-new-app$ cd my-new-app/$ yo feathers$ npm start 要了解更多关于Feathers请访问 feathersjs.com 官网或直接

  • FeathersUI 是一个轻量级的,可换肤的并且可以扩展组件的类库,可用于移动和桌面开发。Feathers通过Starling框架,利用GPU的强大能力渲染组件,来实现更加平滑和友好的体验。 Feathers 是免费和开源的。Feathers可以运行在Starling框架和Adobe Flash运行时之上,包括iOS,Android,Windows和Mac OS上的Adobe AIR,以及桌面浏

  • 本文向大家介绍Vue2.x通用编辑组件的封装及应用详解,包括了Vue2.x通用编辑组件的封装及应用详解的使用技巧和注意事项,需要的朋友参考一下 本文实例为大家分享了Vue2.x通用编辑组件的封装及应用,供大家参考,具体内容如下 效果   组件源码 父组件中引用 注:组件源码中import '@/common/font/iconfont.css'目的是为了引入编辑图标,图标使用于iconfont官网

  • 本文向大家介绍Vue实现搜索结果高亮显示关键字,包括了Vue实现搜索结果高亮显示关键字的使用技巧和注意事项,需要的朋友参考一下 本文实例为大家分享了Vue实现搜索结果高亮显示关键字的具体代码,供大家参考,具体内容如下 1. 需要解决的问题 父组件将搜索的字段传到子组件 子组件接受数据,正则匹配,并替换字段 2. 具体代码 父组件代码 子组件代码 以上就是本文的全部内容,希望对大家的学习有所帮助,也

  • 本文向大家介绍Vue3.0结合bootstrap创建多页面应用,包括了Vue3.0结合bootstrap创建多页面应用的使用技巧和注意事项,需要的朋友参考一下 本人主要做c#winform应用,刚接触vue,发现用vue做单页面应用的比较多,多页面的资料很少,特别是用vue3.0版本做多页面的资料,更少,所以自己整理一下,结合bootstrap和jquery,也可以给有需要的同行做个参考。 1.首

  • 本文向大家介绍Django+Vue实现WebSocket连接的示例代码,包括了Django+Vue实现WebSocket连接的示例代码的使用技巧和注意事项,需要的朋友参考一下 近期有一需求:前端页面点击执行任务,实时显示后端执行情况,思考一波;发现 WebSocket 最适合做这件事。 效果 测试 ping www.baidu.com 效果 点击连接建立ws连接 后端实现 所需软件包 后端主要借助