Coder Social home page Coder Social logo

nextjs-starter's Introduction

数据请求

前端页面发送请求到后端,后端取到数据后回传给前端,nodejs做中间层
流程:

  • /pages/*中的某个components触发数据请求
  • 请求经reudx action handler -> fetch /pages/api/* -> github api
  • 响应经gtihub api -> /pages/api/* -> redux action handler -> redux reducer

Tree

.
├── README.md
├── actions
│   └── index.ts
├── assets
│   └── style.css
├── components
│   ├── Helmet.tsx
│   ├── Home.tsx
│   ├── IconFont.tsx
│   ├── Layout.tsx
│   ├── Loading.tsx
│   └── styled
├── config
│   ├── api.ts
│   ├── sdk.ts
│   ├── site.ts
│   └── theme.ts
├── constants
│   └── index.ts
├── db
│   ├── connection.js
│   ├── data
│   │   └── Articles.ts
│   ├── database.sqlite
│   ├── entity
│   │   └── Articles.ts
│   ├── migration
│   └── subscribers
├── fetch
│   ├── fetchInstance.ts
│   └── index.ts
├── lib
│   ├── base64.ts
│   └── gtag.ts
├── next-env.d.ts
├── next.config.js
├── package-lock.json
├── package.json
├── pages
│   ├── _app.tsx
│   ├── _document.tsx
│   ├── api
│   │   ├── home.ts
│   │   └── requestInstance.ts
│   └── index.tsx
├── reducers
│   ├── index.ts
│   └── initialState.ts
├── static
├── store
│   └── index.ts
├── tsconfig.json
└── utils
    ├── crypto.ts
    ├── formatDate.ts
    ├── number.ts
    └── setJs.ts

nextjs-starter's People

Contributors

dependabot[bot] avatar xc2f avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.