Coder Social home page Coder Social logo

faunadb-vercel-sample-app's Introduction

Note: This repository has been deprecated and is no longer updated. For a current sample app that shows you how to deploy your apps built with Fauna and Next.js on Vercel, see this repository.


This repository contains unofficial patterns, sample code, or tools to help developers build more effectively with Fauna. All Fauna Labs repositories are provided β€œas-is” and without support. By using this repository or its contents, you agree that this repository may never be officially supported and moved to the Fauna organization.


[DEPRECATED] Hello World example

How to use

Using create-next-app

Execute create-next-app with Yarn or npx to bootstrap the example:

npx create-next-app --example hello-world hello-world-app
# or
yarn create next-app --example hello-world hello-world-app

Download manually

Download the example:

curl https://codeload.github.com/zeit/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/hello-world
cd hello-world

Install it and run:

npm install
npm run dev
# or
yarn
yarn dev

Deploy it to the cloud with now (download)

now

The idea behind the example

This example shows the most basic idea behind Next. We have 2 pages: pages/index.js and pages/about.js. The former responds to / requests and the latter to /about. Using next/link you can add hyperlinks between them with universal routing capabilities. The day directory shows that you can have subdirectories.

faunadb-vercel-sample-app's People

Contributors

brunoquaresma avatar dependabot[bot] avatar fauna-mataway avatar macnealefauna avatar posva avatar rts-rob avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

faunadb-vercel-sample-app's Issues

Rename repository to faunadb-vercel-sample-app

This really isn't a big deal, but I think it might be helpful if the repository was renamed to "faunadb-vercel-sample-app", as Zeit has recently changed their name to Vercel. This might be extra useful in the future, especially if developers forget that Vercel's old name was Zeit.

Thanks for all the awesome work you do at Fauna and it is amazing!

Question: Does this support local development?

Looking at the following code I noticed developing locally is not possible, is there a way around this?

App.getInitialProps = async ({ req }) => {
  try {
    const { 'x-now-deployment-url': nowURL } = req.headers;

    if (!nowURL) {
      throw new NotDeployedError();
    }

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.