Giter Site home page Giter Site logo

cycymomo / nexma Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 963 KB

Nexma 🔱 Next.js with Apollo and Prisma

Home Page: https://nexma.now.sh

CSS 1.97% JavaScript 96.59% Shell 1.44%
prisma prisma2 nextjs next-translate graphql graphql-yoga nexus-prisma react-hooks apollo

nexma's Introduction

Nexma - Next.js with Apollo and Prisma

Prerequisites

  • Install Node & npx

    ❯ npm i -g npx

  • Install dotenv

    ❯ npm i -g dotenv

  • Install Now

    ❯ npm i -g now

  • Create your .env files and set your env

    ❯ cp .env.example .env ❯ cp server/.env.example server/.env ❯ cp server/prisma/.env.example server/prisma/.env

Dev

This project is using MySQL. You're database must be running.

Run the client cd client && npm run dev and run the server cd server && npm start

Client

Code is in the client directory.

It's a Next.js app with Apollo and next-translate.

You can access it via http://localhost:3000

client/pages directory from Next is generated thanks to next-translate. There is a sub directory for each lang.

You have to code your pages in client/pages_

Server

Code is in the server directory.

You can access your server GraphQL playground via http://localhost:4000/graphql

Prisma

Code is in the server/prisma directory.

Update your local database depending of your shema file

❯ npm run deploy-prisma

Release

You will need a working MySQL database running somewhere (AWS, Heroku, etc)

Do these 4 steps only once:

  • in console, type now secret add app_secret <APP_SECRET>
  • in console, type now secret add database_url <DATABASE_URL>
  • set SERVER_URL in client/next.config.js
  • set SERVER_URLand CLIENT_URL in now.json

Then, each time you want to release in prod: npm run release

nexma's People

Contributors

cycymomo avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar

nexma's Issues

i18n

  • auto detect language, fallback english if no language available
  • make Post i18n

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.