GithubHelp home page GithubHelp logo

peterbe / autocompeter Goto Github PK

View Code? Open in Web Editor NEW
276.0 276.0 19.0 4.43 MB

A really fast AJAX autocomplete service and widget

Home Page: https://autocompeter.com

License: Mozilla Public License 2.0

CSS 7.35% HTML 20.61% JavaScript 28.96% Python 40.06% Shell 1.58% Makefile 1.44%

autocompeter's People

Contributors

doppins-bot avatar mmccaff avatar peterbe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autocompeter's Issues

Error: Unable to sign in because of an error from Auth0. (Access denied.)

Steps:

  1. I click Use your GitHub account to authenticate so you can manage your Auth-Key.
  2. I click the Github black button inside the Auth0 login widget.
  3. I click in Github the green button: Authorize peterbe. Peterbe.com is successfully added to my Authorized OAuth Apps list when checked later.
  4. I get a danger alert with the message: Unable to sign in because of an error from Auth0. (Access denied.).

I see in Chrome devtools I got redirected to this URL after the autorization:

https://peterbecom.auth0.com/login/callback?code={code here}&state={code here}

and then it redirects to:

https://autocompeter.com/auth/callback?error=unauthorized&error_description=Access%20denied.

Django access error

I have installed everything as per read-me. But I get this error:

web_1 | Invalid HTTP_HOST header: '34.195.94.88:8000'. You may need to add '34.195.94.88' to ALLOWED_HOSTS.

Can't generate API Key

I'm not sure if this is the correct place to file this issue, but I can't seem to create an API Key by using the website. The page refreshes, but the domain is not added to the list.

Hosting autocompeter yourself

Hi,

First of all: nice effort in autocompeter.

I noticed...

I couldn't help but noticing that one can override the url variable. Even though this might not have been the intention (when you built it), it allows one to host their own autocompeter server.

One could...

I can imagine this being useful, when the backend is in Go as well. One could simply go get your library, and set up their own autocompeter endpoint. One could call

http.HandleFunc("/search/api", autocompeter.SearchHandler)

in combination with

<script>
var q = document.getElementById("q");
Autocompeter(q, {
            url: '/search/api',
            ping: false     // not needed as it can be hosted at the same domain
});
</script>

Reasons for wanting this include:

  • Privacy (I don't really imagine this to be an issue, but doing this allows one to use this search engine for protected websites that require the user to be logged in);
  • Faster updating (even though your API is probably fast, not having to go across the web to do it, is faster)
  • Uptime "guarantee": when the website is online, then chances are quite big the search-engine is online as well
  • Less traffic/requests to autocompeter.com

One only needs...

...a back-end for the searching.

Now I have successfully implemented a simple back-end for such purpose: using the same technique as you described. I'm using Go map[string][]int for that, which might be less efficient than Redit (I'm not a Redis-user), but as it's not making calls across processes, it should be faster for small databases. As such, it is only in-memory. But it allows you to easily (programmatically) update the database without using the Api to autocompeter.com/v1.

If you can, I can wrap this up nicely and make a PR for this, and put some effort in making it publicly available. If you don't like the idea (or would like some adjustments), feel free to discuss.

500 Server Error on Login

The API doesn't like any of the github accounts I've attempted to login with. Always a 500 server error as soon as Github verifies my login. what a shame

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.