A simple full-stack text autocompletion implementation.
- Text input box with autocomplete functionality
- Autocomplete suggestions served by server
- Simple front end, allowing users to select a suggestion to automatically complete
- Back end testing in Tape
- Repo badges in README.md (Travis build status and Codecov percentage)
- Modular back end
- Clone the repo to a local directory
- Run
npm installfrom the root folder to install dependencies - Run
nodemonfrom the terminal to start the server through nodemon, ornode server.js - Access the front end by visiting
http://localhost:3000
server.js: Basic server functionality and ping function to keep heroku server awakesrc/router.js: Routes incoming requests to the appropriate handler functionsrc/handler.js: Handles all incoming requests and serves responsessrc/autocomplete.js: Takes a string as an input and returns an array of autocomplete suggestionssrc/orderedDict.json: A JSON file containing an array of words in the General Service List, sorted by frequency of use (most frequent to least frequent)public/index.html: Homepagepublic/main.css: Main stylesheetpublic/main.js: Front end JavaScript handling DOM events and manipulationpublic/request.js: JavaScript handling front-end XHRspublic/reset.css: CSS reset stylesheet
- QUnit
- Tape
- Tap-spec
- Eslint semi-standard
- Nodemon
- run
npm installfrom root folder to install dependencies
- Run
npm testto execute tape tests - Qunit testing of the front end
- Istanbul
- Tape testing of back end