Skip to content

happymeex/inn-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Search The Wandering Inn

This is a search website for ✨The Wandering Inn✨, a great fantasy LitRPG webnovel. It's got memorable characters, expansive worldbuilding, and a gripping story full of magic and monsters. You should check it out!

I started developing this site while the webnovel's own search function was broken. It has since been fixed, but I figured I could improve the UI/UX so I built this site anyways. Here are some features:

  • Search results with keyword-highlighted excerpts
  • Sorting search results by relevance or by chronology
  • A few Easter eggs...?

Development

This repository contains the source code for both the web client and the server. The code was developed and tested in Ubuntu.

To develop locally: first clone and npm install. Then make a .env file in the root directory containing a line ADMIN_KEY=[password], where [password] is a string of your choosing. Run npm start to compile and start the server. If the server has not already fetched the webnovel text and written it to disk, it will do so. This should take a few hours; the console will notify you when it is finished. (It fetches in batches of 8 every 2 minutes to avoid a 429 response from the TWI web server. You can adjust these parameters by playing with the constants in server/preprocessing.ts.) Subsequent server starts bypass the webscraping step.

To see the frontend, visit https://localhost:3000/ in your browser. If you make changes to the client, run npm run copy before visiting the site again.

While the server is running, you can issue admin commands: To make the server to refetch and update its copy of the text data, make a GET request (e.g. using your browser) to

https://localhost:3000/admin?password=[password]&command=reset

To fetch and update the data when a new chapter is released, make a GET request to

https://localhost:3000/admin?password=[password]&command=update

See server/server.ts for the complete list of commands and specifications.