Giter Club home page Giter Club logo

api.php's Introduction

Iconify API

This software is no longer maintained. Use Node.js version of API: https://github.com/iconify/api

PHP is no longer supported because:

  • It is much slower than Node version of API.
  • It has not been maintained for a while.
  • Updating it would require large effort, but it never be able to match Node version because of import and cleanup tools available in Node.

About

This code runs on api.iconify.design that is used to serve collections and SVG images.

Make sure your server matches requirements below:

  • You must have PHP 5.6 or newer version.
  • Server must be running Apache with mod_rewrite enabled and AllowOverride enabled.
  • Files must be writable by same user that runs PHP scripts to allow writing to "cache" and "git-repos" directories.
  • If you are using function to synchronize repositories, make sure Git is installed and is accessable from command line.

Node.js version is available at https://github.com/iconify/api.js

How to use it

Upload files in root directory of your website. Icons server requires its own domain or sub-domain.

Add custom configuration to config.php. Default configuration is available as reference in config-default.php. See config.md

Node vs PHP

Node.js version of server is faster because it loads everything only once on startup. It is a bit harder to setup though because you need to install additional software and make sure server is running (using tools such as "pm2").

PHP process ends when HTTP request ends, so PHP has to reload lots of things for each request. PHP version has caching to minimize loading times, but it is still nowhere near as fast as Node.js version. The only upside of PHP version is it is easy to setup - simply upload files and you are done.

api.php's People

Contributors

cyberalien avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ivan-cc andyg2

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.