zaidmukaddam / getfact

Get a random or all fact from the database that you store

Home Page:https://getfact.deno.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get Fact API

This is a simple API that let you store fact about anything you want and retrieve it later with an api key(uuid v4).

Getting started

Documentation is available here

Prerequisites

Development

This project uses Postgres as a database, the easiest way is to use Supabase to setup postgres database.

  1. Copy .env.example to create a new file .env

    cp .env.example .env
  2. Get your postgres database connection string

  3. Add your connection string to the DATABASE_URL variable

    DATABASE_URL=postgres://user:password@host:port/database
  4. Run the server

    deno run --allow-net --allow-env --allow-read --watch ./src/app.ts
  5. To watch changes for documentation html and css files, run

    deno run --allow-net --allow-read --allow-write --watch ./src/public/index.ts

    note: you need to manually save the /src/public/index.ts file

License

MIT

Copyright (c) 2022 Zaid Mukaddam

About

Get a random or all fact from the database that you store

https://getfact.deno.dev

License:MIT License


Languages

Language:HTML 57.5%Language:TypeScript 34.3%Language:CSS 8.1%Language:Shell 0.1%