Coder Social home page Coder Social logo

xdrdak / gleam-packages Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gleam-lang/packages

0.0 0.0 0.0 209 KB

๐Ÿ“ฆ Search for Gleam packages

Home Page: https://packages.gleam.run/

License: Apache License 2.0

JavaScript 0.68% CSS 9.33% Dockerfile 0.83% Gleam 89.16%

gleam-packages's Introduction

Gleam Packages

๐Ÿ“ฆ Search for Gleam packages on Hex.

A Gleam application using the Wisp web framework, served with the Mist web server, using a SQLite database.

The application is deployed on Fly where LiteFS is used to replicate the SQLite database across all instances of the application.

Environment variables

The application is configured with a series of environment variables.

  • HEX_API_KEY - Required. A read-only API key for the Hex API. You can generate one via the Hex dashboard.
  • DATABASE_PATH - A path where the SQLite database will be stored. Defaults to ./database.sqlite. In production this should be set to $LITEFS_MOUNT_PATH/database.sqlite.
  • LITEFS_PRIMARY_FILE - If this environment variable is set then the application will only attempt to pull information from Hex and insert into the database if there is no file present at this path. When deployed to Fly this file is created by LiteFS for the node that has been elected leader, and the path will be $LITEFS_MOUNT_PATH/.primary.

Local development

Install Gleam! See ./Dockerfile for which version is used in production.

# Download a recent copy of the database
curl -o database.sqlite https://packages.gleam.run/packages.sqlite

gleam test        # Run the tests
gleam run server  # Run the server

The SQL query functions are generated from the sql directory. To regenerate them run gleam run -m codegen.

Deployment

# Deploy the application
fly deploy

gleam-packages's People

Contributors

lpil avatar harryet avatar maxdeviant avatar ffigiel avatar hayleigh-dot-dev avatar michaeljones avatar johnbjrk avatar giacomocavalieri avatar cdaringe avatar xdrdak avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.