Giter Club home page Giter Club logo

remix-google-cloud-functions's Introduction

remix-google-cloud-functions

Remix Adapter for Google Cloud Functions and Firebase Functions.

Usage

Firebase

See the functions directory in the example project.

npm i remix-google-cloud-functions @remix-run/node @google-cloud/functions-framework firebase-functions

Create a Firebase function as follows - build should point to the output from remix build or remix dev.

const { onRequest } = require("firebase-functions/v2/https");
const { createRequestHandler } = require("remix-google-cloud-functions");

const remix = onRequest(
  createRequestHandler({
    build: require("../build"),
  })
);
module.exports = { remix };

Google Cloud Functions

See the gcf in the example project.

npm i remix-google-cloud-functions @remix-run/node @google-cloud/functions-framework

gcf/index.js

const { createRequestHandler } = require("remix-google-cloud-functions");

exports.remix = createRequestHandler({
  build: require("../build"),
});

To run locally, add a script such as:

package.json

    "start": "functions-framework --source gcf --target=remix --port 5003",

Note this does not serve the static assets.

Further details can be found on the official guide.

About Remix

Remix is a web framework that helps you build better websites with React.

To get started, open a new shell and run:

npx create-remix@latest

Then follow the prompts you see in your terminal.

For more information about Remix, visit remix.run!

remix-google-cloud-functions's People

Contributors

dependabot[bot] avatar penx avatar github-actions[bot] avatar rissois 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.