当前位置: 首页 > 软件库 > 大数据 > 数据查询 >

relay-fullstack

授权协议 MIT License
开发语言 Java
所属分类 大数据、 数据查询
软件类型 开源软件
地区 不详
投 递 者 柯凯旋
操作系统 跨平台
开源组织
适用人群 未知
 软件概览





Relay Fullstack is a Relay scaffolding application that aims to help you get up and running a project without worrying about integrating tools. It comes with many modern technologies; Relay, GraphQL, Express, ES6/ES7, JSX, Webpack, Babel, Material Design Lite, and PostCSS. Relay Fullstack is also using Hot-reload to real time update the screen whenever any code changes.

Example

Demo

Check out the Live demo on Heroku.

Usage

Basic

The basic installation contains only general technologies needed by most of the projects, Relay Fullstack is totally unopinionated. If you wanted to include a database, flow, or any specific technologies, please see the Advance section.

First, you need watchman installed, please follow its installation guide. Then, clone the repository to your local directory

$ git clone https://github.com/lvarayut/relay-fullstack.git
$ cd relay-fullstack

Install all dependencies & Start developing

$ npm install
$ npm start

Launch your favorite web browser and go to http://localhost:3000 for Relay application or http://localhost:8000 for GraphiQL.

Advance

Relay Fullstack is integrated with Yeoman that allows you to choose technologies that suit your needs, the options are including database, flow, and etc.

Install yo and generator-relay-fullstack globally

$ npm install -g yo generator-relay-fullstack

Create a new directory and start the generator, it will prompt some questions to help you get up and running

$ mkdir relay-fullstack && cd $_
$ yo relay-fullstack
$ npm start

Launch your favorite web browser and go to http://localhost:3000 for Relay application or http://localhost:8000 for GraphiQL.

NOTE: generator-relay-fullstack is currently working with minimal functionalities. Database, Flow, and Sub-generator are work-in-progress.

Deployment

Local machine

In order to deploy a project, it is a good practice to minify all JavaScript files, stop spawning the GraphiQL server, pull off some duplicate dependencies, and remove all unnecessary scripts, for example, Hot-reload. All of these can be done by executing the following command:

$ npm run deploy

Again, launch your favorite web browser and go to http://localhost:3000.

Heroku

Before getting started, make sure you already installed the Heroku Toolbelt, which is a command-line tooling for managing Heroku applications that makes it easy to deploy an application in a few steps:

$ heroku create                     # Create a new Heroku application
$ git push heroku master            # Push your code into the created Heroku repository
$ heroku ps:scale web=1             # Run the deployed application

That is it! Now, open the application on your default browser using heroku open.

Schema

Whenever you start a server, it will automatically execute updateSchema.js script in order to compile the schema definitions, defined in schema.js, to schema.json and schema.graphql. This is required by Relay framework. However, you could also run the script manually:

$ npm run update

Project Structure

├── client                          - All of the client side code resides in this folder
│   ├── assets                      - Images and fonts
│   ├── components                  - Relay containers, React components, and SCSS files used in the components
│   │   └── variables.scss          - Common SCSS variables
│   ├── routes                      - React-router-relay 
│   │   ├── Route.js                - All route definitions
│   │   └── ViewerQuery.js          - Entry node of a GraphQL query
│   ├── index.html                  - HTML template file used by html-webpack-plugin 
│   └── index.js                    - Client entry point
├── server                          - All of the server side code resides in this folder
│   ├── config                      - Configuration 
│   │   └── environment             - Separate configuration for each environment
│   │       ├── development.js      - Development configuration
│   │       ├── index.js            - Common configuration used in any environment
│   │       ├── production.js       - Production configuration
│   │       └── test.js             - Test configuration
│   ├── data                        - Data and APIs 
│   │   ├── database.js             - Mock up database which should be replaced with your real database logic
│   │   ├── schema.graphql          - Compiled schema in a readable form
│   │   ├── schema.js               - Schema definitions
│   │   └── schema.json             - Compiled schema to be used by Relay 
│   ├── utils                       - Utilities 
│   │   ├── babelRelayPlugin.js     - Babel-relay-plugin provided by Relay
│   │   └── updateSchema.js         - Code for compiling the defined schema to schema.json and schema.graphql
│   └── index.js                    - Server entry point
├── package.json                    - List of dependencies
├── webpack.config.js               - Webpack configuration

Technologies

Frameworks

Relay - A JavaScript framework for building data-driven react applications. It is required to be used with React and GraphQL.

React - A JavaScript library for building user interfaces. It introduces many great concepts, such as, Virtual DOM, Data flow, etc.

GraphQL - GraphQL is a query language and execution engine tied to any backend service.

Express - Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.

Module bundler & Syntax transformers

Webpack - Webpack is a module bundler that takes modules with dependencies and generates static assets representing those modules.

Babel - Babel is a JavaScript compiler which allows you to use next generation, ES6/ES7, JavaScript, today.

Languages

ES6/ES7 - ECMAScript 6, also known as ECMAScript 2015, is the latest version of the ECMAScript standard. ES6 is a significant update to the language.

JSX - JSX is a JavaScript syntax extension that looks similar to XML. You can use a simple JSX syntactic transform with React.

Designs

Material Design Lite - Material Design Lite lets you add a Material Design look and feel to your websites.

PostCSS - PostCSS is a tool for transforming CSS with JavaScript. It has roughly 200 plugins to help you write CSS easier.

Additional Tools

React transform HMR - A React Transform that enables hot reloading React classes.

React router relay - Relay integration for React Router.

Eslint - The pluggable linting utility for JavaScript and JSX.

Autoprefixer - Parse CSS and add vendor prefixes to rules.

Precss - Use Sass-like markup in your CSS.

Nodemon - Monitor for any changes in your node.js application and automatically restart the server.

CSS Modules - CSS file in which all class names and animation names are scoped locally by default.

Credits

Contributors

lvarayut ncrmro Neitsch maksugr AdamZaczek BlakeBrown
lvarayut ncrmro Neitsch maksugr AdamZaczek BlakeBrown
ianaya89 crucialfelix arnif jtfell kennydee kkostov
ianaya89 crucialfelix arnif jtfell kennydee kkostov
lexun narongdejsrn sankalpk jg123
lexun narongdejsrn sankalpk jg123

License

MIT © Varayut Lerdkanlayanawat

  • 当我们要写入新数据而发生“The table is full”告警错误时,先不要着急,按照下面的思路来逐步分析即可: 1、查看操作系统以及MySQL的错误日志文件 确认操作系统的文件系统没有报错,并且MySQL的错误日志文件中是否有一些最直观的可见的错误提示。 有可能是数据库文件超过操作系统层的文件大小限制,比如fat/fat32以及低版本的Linux,文件最大不可以大于2G(最大扩展到4G),这

 相关资料
  • 温馨提示: Relay 是构建数据驱动 React 应用的 JavaScript 框架。 主要特性: 声明式:不再使用一个命令式 API 与数据存储通讯。简单的使用 GraphQL 声明你的数据需求,让 Relay 理解如何,什么时候获取你的数据。 托管:查询在视图后面,Relay 聚合查询成有效的网络请求,只获取你需要的数据。 转变:Relay 允许你使用 GraphQL mutations 在

  • SQLRelay 是一个持久化的数据库连接池,用来为 Unix 或者 Linux 提供数据库连接池、代理以及负载均衡的功能。 SQL Relay 的应用思路: 加速数据库驱动的基于 Web 的应用程序 增加 Web 应用程序的可扩展性 分布式的访问复制的数据库系统 对数据库访问进行节流 从不被支持的平台上访问某个数据库 可以轻松的对数据库系统进行移植 目前 SQL Reply 支持的数据库包括:

  • nassh-relay 为 Chromium 浏览器的 Secure Shell (hterm) 插件实现了一个中继服务器。可通过 HTTP xhr 或者 WebSockets 连接实现 SSH 通道连接。可作为一个网关来将流量引入内部网络,支持 HTTP 认证。

  • GraphQL API and Relay Starter Kit Features Monorepo project structure powered by Yarn v2 with PnP GraphQL API using code-first development approach (TypeScript, GraphQL.js, Knex, PostgreSQL) Stateless

  • Relay Library for GraphQL.js This is a library to allow the easy creation of Relay-compliant servers using the GraphQL.js reference implementation of a GraphQL server. Getting Started A basic understa

  • homebridge-nodemcu-relay This script interfaces with homebridge to expose a relay to Apple's HomeKit, allowing you to integrate numerous devices into your smart home. Requirements NodeMCU Relay Module