Coder Social home page Coder Social logo

resume_backend's Introduction

后台逻辑

2018/8/9

创立项目结构

├─.gitignore ├─package.json ├─readme.md ├─express | ├─index.js | ├─static | ├─router | | └login.js | ├─model | | └connect _resume.js | ├─control | | ├─getlogin.js | | └postlogin.js

书写/login的get和post请求

  • 当request为get时,根据session中userinfo的值判断是否从数据库中调取数据返回给客户端
  • 当request为post时,获取req中的数据存储到数据库,并根据saveInfo决定是否往session中存储userInfo (难点)

解决跨域请求服务器配置问题

const cors = require('cors'); var corsOptions = { origin: 'http://localhost:8080', credentials: true, maxAge: '1728000' //这一项是为了跨域专门设置的 } app.use(cors(corsOptions))

书写/register的post请求

  • 用formidable module来实现multipart/form-data的数据接收 (难点)
  • 数据库重名验证
  • 数据库写入

resume_backend's People

Contributors

jack11023 avatar

Watchers

James Cloos 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.