Skip to content

GabsEdits/funfact-generator

Repository files navigation

Funfact Generator

Generate random fun facts for any occasion, in multiple languages.

Made for Highseas.

Links

API

For the API, I used Deno and Hoco.

Examples

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: English
  • ro: Romanian
  • de: 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/random

The categories are:

  • random: Random fun fact from all categories

  • history: Fun fact from history

  • science: Fun fact from science

  • geography: Fun fact from space

Development

Make sure you have Deno installed.

To start the server, run:

deno run -NR mod.ts

![NOTE] Make sure you are in the api directory.

Frontend

Development

The project is build using Vite and Svelte.

Make sure you have Deno installed.

Installation

deno install

Scripts

  • dev: Start the development server (deno task dev)
  • build: Build the project (deno task build)
  • preview: Serve the build project (deno task preview)

License

This project is licensed under the GNU Affero General Public License v3.0. See the LICENSE file for more information.

About

Simple Funfact Generator (API & Frontend)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors