Giter Site home page Giter Site logo

demo_deploy's Introduction

npm init
mongod --dbpath $HOME/data

2	
POST

The POST method requests that the server accept the data enclosed in the request as a new object/entity of the resource identified by the URI.

3	
PUT

The PUT method requests that the server accept the data enclosed in the request as a modification to existing object identified by the URI. If it does not exist then the PUT method should create one.

Phân biệt session với cookie:
session: lưu trên server, khi lưu session, 1 cookie dc tự động lưu để xác định user cho session.
cookie: lưu trên client. có thể bị thay đổi dễ dàng
cache: lưu các resource để máy load nhanh hơn

RESTful API không sử dụng session và cookie, nó sử dụng access_token với mỗi request, nó là một tiêu chuẩn trong việc thiết kế API nhằm tạo ra sự thuận tiện trong việc quản lý tài nguyên.
RESTful API là một tiêu chuẩn trong việc thiết kế API cho ứng dụng web để tiện trong việc quản lý các resource. Nó chú trọng vào các tài nguyên hệ thống(tệp văn bản, hình ảnh, âm thanh, video hoặc dữ liệu động, ..) bao gồm các trạng thái tài nguyên được định dạng và truyền tải thông qua HTTP
PUT: nếu như document không tồn tại thì tạo mới, nếu như tồn tại thì cập nhật toàn bộ các trường của document
PATCH: nếu như document không tồn tạo thì không tạo mới, nếu như tồn tại thì chỉ cập nhật hoặc thêm trường mới vào
DEBUG: DEBUG=express:* nodemon index.js

demo_deploy's People

Contributors

anhtoan1103 avatar

Stargazers

 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.