Giter Site home page Giter Site logo

ci4rest-sample's Introduction

CodeIgniter 4 RESTful API 샘플

CodeIgniter란?

CodeIgniter는 가볍고 빠르고 유연하며 안전한 PHP 풀 스택 웹 프레임워크입니다.

자세한 내용은 Codeigniter 한국 사용자 포럼 이나 공식 사이트 에서 확인할 수 있습니다.

  • 사용자 가이드 안내

한국어 버전. 영문 버전.

RESTful API 샘플

CodeIgniter 4 웹 프레임워크를 사용하여 만든 RESTful API 샘플입니다. KCD(Korea Community Day) 2020 행사의 일환인 "CodeIgniter4만으로 RESTful api 구현하기" 트랙을 위해 작성되었습니다. CodeIgniter 4를 이용하여 RESTful API를 만들고자 하는분들께 시작점이 되기를 기대합니다.

Youtube동영상

설치 및 실행 방법

  1. git clone https://github.com/hoksi/ci4rest-sample.git
  2. composer install --no-dev
  3. copy env-restsample .env
  4. php spark serve
  5. 웹브라우저에 http://localhost:8080/api/user 접속

테스트

  1. User List : http://localhost:8080/api/user get
  2. Add User : http://localhost:8080/api/user post
  3. Modify User : http://localhost:8080/api/user/{user_id} gputet
  4. Get User : http://localhost:8080/api/user/{user_id} get2
  5. Delete User : http://localhost:8080/api/user/{user_id} del

POSTMAN Collection

포스트맨을 이용하여 API 테스트를 합니다.

Run in Postman

ci4rest-sample's People

Contributors

hoksi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ci4rest-sample's Issues

ci4 버전 호환문제

종속성 다운로드 시에 ci4 4.1 -> 4.2 로 버전업이 되면서, 해당 프로젝트가 정상적으로 동작하지 않습니다.

해결방법 공유합니다.
composer.json 파일에서 ci4 버전을 다음과 같이 수정해줍니다.
"codeigniter4/framework": "4.1.*"

rm composer.lock vendor/ 명령으로 파일 및 디렉토리 제거 후,
composer --no-dev 명령으로 종속성들을 설치합니다.

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.