• The client uses React + ApolloClient + GestaltUI
  • The server uses Koa2 + GraphQL + Mongoose

Github is welcome to ⭐

Github.com/tzuser/reac…

The online preview

  • The online preview
  • API

Start the

cnpm install
npm run start
Copy the code

The default is to connect to a remote server, and the following is to connect to a local service

  1. Install the mongo
  2. To change theserver/db.jsLet the db = mongoose. Connect (' mongo: / / web: [email protected]:27017 / web ')Connection address.
  3. And change thesrc/public.jsWhere the HOST constant ishttp://localhost:8181
  4. runnpm run server

File directory

├ ─ ─ index. The ejs ├ ─ ─ package. The json ├ ─ ─ the README. Md ├ ─ ─ server │ ├ ─ ─ the js │ ├ ─ ─ graphql │ │ ├ ─ ─ APIError. Js │ │ ├ ─ ─ the comment. Js │ │ ├ ─ ─ file. Js │ │ ├ ─ ─ formatError. Js │ │ ├ ─ ─ the main, js │ │ ├ ─ ─ post. Js │ │ ├ ─ ─ public. Js │ │ └ ─ ─ the user. The js │ ├ ─ ─ index, js │ ├ ─ ─ render. Js │ └ ─ ─ for server js ├ ─ ─ the SRC │ ├ ─ ─ the actions │ │ ├ ─ ─ config. Js │ │ ├ ─ ─ photo. Js │ │ └ ─ ─ public. Js │ ├ ─ ─ The Components │ │ ├ ─ ─ AddPhoto. JSX │ │ ├ ─ ─ Footer. The JSX │ │ ├ ─ ─ FooterNavLink. JSX │ │ ├ ─ ─ HeaderContainer. JSX │ │ ├ ─ ─ JSX │ ├─ Anti-Flag. JSX │ ├─ Anti-Flag. JSX │ ├─ Anti-Flag. JSX │ ├─ Anti-Flag PostList. JSX │ │ ├ ─ ─ Scroll. The JSX │ │ └ ─ ─ Tabs. The JSX │ ├ ─ ─ the js │ ├ ─ ─ Containers │ │ ├ ─ ─ App. The JSX │ │ ├ ─ ─ Comments. JSX │ │ ├ ─ ─ the Create the JSX │ │ ├ ─ ─ the Find. The JSX │ │ ├ ─ ─ Home. The JSX │ │ ├ ─ ─ the Join the JSX │ │ ├ ─ ─ the Login. The JSX │ │ ├ ─ ─ JSX │ ├── ├.jsx │ ├── ├.jsx │ ├── User.jsx │ ├── ├.jsx │ ├── Index. Js │ ├ ─ ─ the Module │ │ ├ ─ ─ MaterialUIServiceRendering. Js │ │ └ ─ ─ PWS. Js │ ├ ─ ─ public │ │ ├ ─ ─ Global. Js │ │ ├ ─ ─ Theme. Js │ │ └ ─ ─ tool. Js │ ├ ─ ─ public. Js │ ├ ─ ─ reducers │ │ ├ ─ ─ config. Js │ │ ├ ─ ─ index. The js │ │ └ ─ ─ loads. The js │ ├ ─ ─ the static │ │ ├ ─ ─ the favicon. Ico │ │ ├ ─ ─ logo. The PNG │ │ └ ─ ─ the manifest. Json │ └ ─ ─ store. Js ├ ─ ─ the static │ ├ ─ ─ default. JPG │ ├ ─ ─ │ ├─ ├─ ├─ webpack.build.js └─ faviconCopy the code