Giter Site home page Giter Site logo

codesearch's Introduction

codesearch

Synopsis

codesearch is a REST API to search in Control Version Repository Hosting Service code.

The search query is sent to the host, and its response is processed and returned in a simplified format:

[
    { "owner": "<owner name>", "repo": "<repository name>", "filename": "<file name>"},
    ...
]

Installation

To install all dependencies enter:

composer install

Rename .env.example```` to .env```.

You need to configure a web server, or use Artisan's built in one:

php artisan serve

Control Version Repository Hosting Service

Currently codesearch communicates with GitHub, but it could be extended to search in another service.

To do that, the developer must implement App\RepoHost interface, and change the registration in App\Providers\RepoHostProvider. Then, the services can be switched changing REPOHOSTSERVICE in .env file.

GitHub Authentication

Github only allows searching in all repositories' code to registered users. Thus, authentication is needed to implement codesearch functionality.

To that end, I created a user in GitHub, and the application uses its credentials to log in. GitHub credentials are set in .env file.

API Reference

Endpoints (currently only one) are described in doc/api.pdf.

Testing

To test the application, enter this command

composer test

License

codesearch is written by Pablo J. Urbano Santos..

Laravel is copyrighted by Taylor Otwell and released under the terms of MIT License

codesearch's People

Watchers

James Cloos avatar  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.