Coder Social home page Coder Social logo

iamviniciuss / blog-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alexlancer/codeigniter-4-restapi-tutorial

0.0 0.0 0.0 415 KB

License: MIT License

PHP 95.06% CSS 1.31% JavaScript 1.50% HTML 0.24% Python 0.22% Hack 0.01% Shell 1.66%

blog-api's Introduction

# CodeIgniter 4 RESTapi Server

CodeIgniter 4 RESTapi Server based on YouTube tutorial

https://www.youtube.com/watch?v=qPefoRbsfMc&list=PLYogo31AXFBN23O7wHgQv7eI7Qf84nj4W

1. Clone to you XAMPP/WAMP directory

navigate inside your project folder using command line/terminal and run:

composer install

2. Create a database in your phpMyAdmin

Once you create your db import restapi.sql

This mysql dump has some dummy data such as:

In oauth_clients table you already have

Client id: testclient

Client secret: testsecret

You should change this credentials to your own randomly generated keys

In users table you already have

User: Alex Lancer

Email: [email protected]

Password: password

oauth_users

not in use because in the tutorial we created custom Storage driver and used our own table for storing the users which is named 'users' instead of the default table 'oauth_users'

3. Time to setup your .env file

  1. Duplicate env file and uncomment all database.default lines and set you database connection details
  2. Add new line after database.default.DBDriver = MySQLi

    database.default.DSN = 'mysql:dbname=ADD_YOUR_DB_NAME;host=localhost'

  3. Uncomment and set app.baseURL

4. Setup your server to point into public folder of CodeIgniter

Watch this video: https://www.youtube.com/watch?v=qPefoRbsfMc&t=320s

You're good to GO!!!

blog-api's People

Contributors

iamviniciuss avatar alexlancer avatar alexdevstudio 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.