加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

React GraphQL Koa仿Pinterest手机端

发布时间:2020-12-15 06:30:07 所属栏目:百科 来源:网络整理
导读:客户端使用React + ApolloClient + GestaltUI 服务端使用Koa2 + GraphQL + Mongoose github 欢迎加? https://github.com/tzuser/react-graphql 在线预览 在线预览 API 启动 cnpm installnpm run start 默认是连接远程服务器的,以下连接本地的服务 安装mongo
  • 客户端使用React + ApolloClient + GestaltUI
  • 服务端使用Koa2 + GraphQL + Mongoose

github 欢迎加?

https://github.com/tzuser/react-graphql

在线预览

  • 在线预览
  • API

启动

cnpm install
npm run start

默认是连接远程服务器的,以下连接本地的服务

  1. 安装mongodb
  2. 更改 server/db.jslet db=mongoose.connect('mongodb://web:wysj3910@127.0.0.1:27017/web') 连接地址。
  3. 并更改 src/public.js 里的 HOST 常量为 http://localhost:8181
  4. 运行 npm run server

文件目录

├── index.ejs
├── package.json
├── README.md
├── server
│ ├── db.js
│ ├── graphql
│ │ ├── APIError.js
│ │ ├── comment.js
│ │ ├── file.js
│ │ ├── formatError.js
│ │ ├── main.js
│ │ ├── post.js
│ │ ├── public.js
│ │ └── user.js
│ ├── index.js
│ ├── render.js
│ └── server.js
├── src
│ ├── actions
│ │ ├── config.js
│ │ ├── photo.js
│ │ └── public.js
│ ├── Components
│ │ ├── AddPhoto.jsx
│ │ ├── Footer.jsx
│ │ ├── FooterNavLink.jsx
│ │ ├── HeaderContainer.jsx
│ │ ├── Header.jsx
│ │ ├── HiddenFooter.jsx
│ │ ├── IconButton.jsx
│ │ ├── ListButton.jsx
│ │ ├── PageLoading.jsx
│ │ ├── PostList.jsx
│ │ ├── Scroll.jsx
│ │ └── Tabs.jsx
│ ├── constants.js
│ ├── Containers
│ │ ├── App.jsx
│ │ ├── Comments.jsx
│ │ ├── Create.jsx
│ │ ├── Find.jsx
│ │ ├── Home.jsx
│ │ ├── Join.jsx
│ │ ├── Login.jsx
│ │ ├── MoreLikes.jsx
│ │ ├── Notice.jsx
│ │ ├── Post.jsx
│ │ ├── User.jsx
│ │ ├── UserLikes.jsx
│ │ └── UserPosts.jsx
│ ├── index.js
│ ├── Module
│ │ ├── MaterialUIServiceRendering.js
│ │ └── PWS.js
│ ├── public
│ │ ├── Global.js
│ │ ├── Theme.js
│ │ └── tool.js
│ ├── public.js
│ ├── reducers
│ │ ├── config.js
│ │ ├── index.js
│ │ └── loads.js
│ ├── static
│ │ ├── favicon.ico
│ │ ├── logo.png
│ │ └── manifest.json
│ └── store.js
├── static
│ ├── default.jpg
│ ├── favicon.ico
│ ├── logo.png
│ └── manifest.json
├── webpack.build.js
└── webpack.dev.js

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读