Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tharunoptimus/search-engine
Search Engine 🔍 to search for sites and images.
https://github.com/tharunoptimus/search-engine
api expressjs mongodb pug
Last synced: 18 days ago
JSON representation
Search Engine 🔍 to search for sites and images.
- Host: GitHub
- URL: https://github.com/tharunoptimus/search-engine
- Owner: tharunoptimus
- License: mit
- Created: 2021-07-17T16:19:30.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-11T11:45:49.000Z (about 3 years ago)
- Last Synced: 2024-11-11T08:47:49.999Z (3 months ago)
- Topics: api, expressjs, mongodb, pug
- Language: JavaScript
- Homepage: https://search.cyclic.app/
- Size: 355 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Search Engine
## Config
Add Environment Variable MONGO_URL in a .env file or as an environment variable on your hosting platform.## Add data to the database - Crawler
- Clone this repository Crawler Bot to another directory and run it
- Access the /crawl page in the above app to crawl for the data## Install
`npm install` to install all the dependencies## Run
`npm start` to start the app in dev serverEnjoy
## General Details
### Packages Used
- Express to create the server and manage routes
- Pug to render the html pages
- Mongoose to connect to the database
- Mongo Sanitize to sanitize the text field before searching### API
- Crawler Bot uses a REST API to crawl the data.
- API uses `node-fetch` and `cheerio` to crawl for data### Text search
- Uses mongoDB text search to search for the data
- The fields are indexed while creating the collection schema in the database### View Engine - Pug
- HTML is generated using the Pug template engine### PWA
- The app is served using the service worker while offline
- Passes the lighthouse audit 100%