Giter Site home page Giter Site logo

riskinova / filkom-news-reader_server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ngengs/filkom-news-reader_server

0.0 1.0 0.0 565 KB

Server to filkom news reader API provider and crawl news data

Home Page: http://filkom-news-reader.ngengs.com

License: Apache License 2.0

ApacheConf 1.91% PHP 96.04% HTML 2.05%

filkom-news-reader_server's Introduction

Filkom News Reader Server

GitHub release Codacy Badge

Filkom News Reader Server is backend service for filkom news reader app. It build based on Codeigniter. The server will perform crawling data and give API for access the data.

See Online Here

Requirement

  • PHP >= 7.1
  • Codeigniter >= 3.1.6

Installation

  • Clone this Repo
  • Download Codeigniter file
  • Unzip/Extract the Codeigniter file but don't replace the composer.json
  • Change crawler token in web config application/config/web_config.php
    $config['crawler_token'] = 'YOUR_TOKEN'
    
  • Change some config application/config/config.php from Codeigniter to this
    $config['index_page'] = '';
    ...
    $config['subclass_prefix'] = 'FNR_';
    ...
    $config['composer_autoload'] = TRUE;
    
  • Change routers config application/config/routes.php from Codeigniter to this
    $route['default_controller'] = 'Docs';
    
  • Add some constant in application/confog/constants.php
    /*
     * JSON Object Key
     */
    defined('KEY_STATUS') OR define('KEY_STATUS', 'status');
    defined('KEY_STATUS_CODE') OR define('KEY_STATUS_CODE', 'code');
    defined('KEY_STATUS_MESSAGE') OR define('KEY_STATUS_MESSAGE', 'message');
    defined('KEY_DATA') OR define('KEY_DATA', 'data');
    
    /*
     * JSON Default Value
     */
    defined('VALUE_STATUS_OK') OR define('VALUE_STATUS_OK', 'OK');
    defined('VALUE_STATUS_CODE_OK') OR define('VALUE_STATUS_CODE_OK', 200);
    defined('VALUE_STATUS_MESSAGE_DEFAULT') OR define('VALUE_STATUS_MESSAGE_DEFAULT', null);
    defined('VALUE_STATUS_ERROR') OR define('VALUE_STATUS_ERROR', 'ERROR');
    defined('VALUE_STATUS_CODE_ERROR') OR define('VALUE_STATUS_CODE_ERROR', 404);
    defined('VALUE_STATUS_MESSAGE_ERROR') OR define('VALUE_STATUS_MESSAGE_ERROR', 'Something wrong!');
    defined('VALUE_DATA_ERROR') OR define('VALUE_DATA_ERROR', null);
    
  • Import the db_structure.sql to your database
  • Change config for database in application/config/database.php
  • Install composer dependencies
    $ php composer.phar install
  • Change CI_ENV in bottom of .htaccess to production or developmet

Contributing

Please look at Contributing

License

Copyright 2017 Rizky Kharisma (@ngengs).

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

filkom-news-reader_server's People

Contributors

ngengs 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.