Code Monkey home page Code Monkey logo

wikisearch-js's Introduction

WikiSearch-API

Build Status

WikiSearch is a RESTful API written in NodeJS that provides search functionality for Github based repository wikis. It does this by locally cloning the repository wiki and allowing that repository to be updated and searched.

Note: This project is working but still under heavy development. Use/deploy at your own risk!

Installation

Clone repo locally, npm install, then run server at ./server/app.js.

$ mkdir wikisearch
$ git clone https://github.com/ccampanale/wikisearch-js wikisearch
$ cd wikisearch
$ npm install
$ npm start                    # for more verbose set DEBUG: $ DEBUG=true npm start

API routes can be listed at http://localhost:3000/v1/ and the UI is available over http://localhost:3000/ui/ (server will forward to /ui/ for requests at the root).

Configuration

Configuration can be done via environment variables or a local config.json file in the root of the project. The following configuration items can be configured:

  • config.debug (environment: DEBUG): true or false to debug requests
  • config.server.port (environment: PORT): the port the application is to run on.
  • config.repos.path (environment: REPO_PATH): the path to where repos should be cloned and manged.

Tests

Tests are done using Mocha which is expected to be installed globally:

$ npm install -g [email protected]
$ npm test                    # for more verbose set DEBUG: $ DEBUG=true npm test

Todo

  • add proper configuration capabiltiies
  • enhance regular expressions in PUT /v1/repos/:repo route
  • break out routes from app.js to a server/routes/ directory
  • include optional params from body instead of just from req.query
  • include Github oauth integration for UI
    • This currently only handled by doing checks against the Github/Enterprise API to validate the repo and token provided. No oauth authorizeation/generation is handled in the UI.
  • UI reactive design enhancements
  • add some authentication/authorization capability (ACLs, LDAP, etc.)
  • better error handling
  • code restructoring to clean some things up
    • clean up logging using debug setting
  • expand tests
    • include some failure tests to ensure bad route requests are appropriately handled

Authors

  • Christopher Campanale

Contributors

  • Christopher Campanale

If you would like to contribute to this project please fork and submit a pull request with your additions. Please detail your changes, update the changelog in the readme, and add/modify and mocha tests necessary.

Change Log

  • [master/head]
  • v0.1.2
    • Adds REPO_PATH setting to configure where repos are cloned and managed.
  • v0.1.1
    • UI enchancements/bug fixes
    • Adds ability to optionally read configuration from config.json file
    • Adds DEBUG setting: DEBUG=true npm start
    • Adds PORT setting
  • v0.1.0 - First beta release

wikisearch-js's People

Contributors

ccampanale avatar

Stargazers

 avatar

Watchers

 avatar  avatar

wikisearch-js's Issues

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.