Generate random fun facts for any occasion, in multiple languages.
Made for Highseas.- Frontend: funfact.gxbs.dev
- API: funfact-api.deno.dev
For the API, I used Deno and Hoco.
For a random fun fact:
GET https://funfact-api.deno.dev/{language}/random/random{language} is the language of the fun fact. Currently, the only supported
For a random history fun fact:
GET https://funfact-api.deno.dev/{language}/random/history{language} is the language of the fun fact. Currently, the only supported
languages are:
en: Englishro: Romaniande: German
For example, if you want to get a random fun fact in English, you would use:
GET https://funfact-api.deno.dev/en/random/randomThe categories are:
-
random: Random fun fact from all categories -
history: Fun fact from history -
science: Fun fact from science -
geography: Fun fact from space
Make sure you have Deno installed.
To start the server, run:
deno run -NR mod.ts![NOTE] Make sure you are in the
apidirectory.
The project is build using Vite and Svelte.
Make sure you have Deno installed.
deno installdev: Start the development server (deno task dev)build: Build the project (deno task build)preview: Serve the build project (deno task preview)
This project is licensed under the GNU Affero General Public License v3.0. See the LICENSE file for more information.