Giter Site home page Giter Site logo

benawad / fullstack-graphql-airbnb-clone Goto Github PK

View Code? Open in Web Editor NEW
1.7K 71.0 445.0 804 KB

A Fullstack GraphQL Airbnb Clone with React and React Native

License: MIT License

Dockerfile 0.42% Shell 0.52% TypeScript 96.35% JavaScript 0.37% HTML 1.29% CSS 1.05%
graphql typescript nodejs react-native reactjs

fullstack-graphql-airbnb-clone's Introduction

fullstack-graphql-airbnb-clone

A Fullstack GraphQL Airbnb Clone with React and React Native.

Packages

This project is made up of 5 packages that share code using Yarn Workspaces.

  • web (React.js website)
  • app (React Native app)
  • server (GraphQL Typescript server)
  • common (Code shared between web, app, and server)
  • controller (Components shared between web and app)

Installation

  1. Clone project
git clone https://github.com/benawad/fullstack-graphql-airbnb-clone.git
  1. cd into folder
cd fullstack-graphql-airbnb-clone
  1. Download dependencies
yarn
  1. Start PostgreSQL server
  2. Create database called graphql-ts-server-boilerplate
createdb graphql-ts-server-boilerplate
  1. Add a user with the username postgres and and no password. (You can change what these values are in the ormconfig.json)

  2. Connect to the database with psql and add the uuid extension:

CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
  1. Install and start Redis

  2. In packages/server create a file called .env and add the following line inside: FRONTEND_HOST=http://localhost:3000

  3. Run yarn build in packages/common

  4. Run yarn build in packages/controller

  5. Get Google Maps API key and put it here https://github.com/benawad/fullstack-graphql-airbnb-clone/blob/master/packages/web/public/index.html#L14 Videos doing that: https://youtu.be/-QQnzDVcTCo and https://youtu.be/xLlIgokKiLc

Usage

  1. Start server yarn start in packages/server

  2. Now you can run yarn start in packages/web or packages/app to start the website or app.

  3. How to get credentials working in graphql playground: https://youtu.be/oM-EmNdhwI4?t=8m39s

Deploy

Server

  1. https://www.youtube.com/watch?v=qQAozc1MkdU
  2. https://www.youtube.com/watch?v=0t-rE5wUP-E

Website

  1. https://www.youtube.com/watch?v=FiU3SHEaFwk
  2. https://www.youtube.com/watch?v=vPu1sfuYFzw
  3. https://www.youtube.com/watch?v=Ry6Zobb-kaw

Features

  1. Website register/login
  2. Deploy backend and frontend
  3. App register/login
  4. Website and App forgot password
  5. Website and App create listing
  6. Website and App view listings
  7. logout
  8. Website chat

fullstack-graphql-airbnb-clone's People

Contributors

benawad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fullstack-graphql-airbnb-clone's Issues

server test failed

TypeError: environment.teardown is not a function

  at ../../node_modules/jest-runner/build/runTest.js:440:25

[docs] How to setup nodemailer

Hi Ben, thanks for adding the docs - super helpful :). Trying to set this up, one thing I got stuck on was how to get emails to send. Any advice would be much appreciated.

Argument of type 'typeof C' is not assignable

I have this error in controller/src/modules/RegisterController/index.tsx

on this line :
export const RegisterController = graphql(registerMutation)(C);

I think this error throw because of ChildMutateProps but I can't resovle the issue

[ts]
Argument of type 'typeof C' is not assignable to parameter of type 'ComponentType<Partial<DataProps<any, any>> & Partial<MutateProps<any, any>> & Props>'.
  Type 'typeof C' is not assignable to type 'ComponentClass<Partial<DataProps<any, any>> & Partial<MutateProps<any, any>> & Props, any>'.
    Types of parameters 'props' and 'props' are incompatible.
Type 'Partial<DataProps<any, any>> & Partial<MutateProps<any, any>> & Props' is not assignable to type 'Readonly<ChildMutateProps<Props, any, any>>'.
        Types of property 'mutate' are incompatible.
          Type 'MutationFn<any, any> | undefined' is not assignable to type 'MutationFn<any, any>'.
            Type 'undefined' is not assignable to type 'MutationFn<any, any>'. [2345]

Upgrade to use Typescript 3 project references

Typescript project references

SD Times article

"references were one of the biggest improvements of the release, making it easier for developers to share dependencies between multiple TypeScript projects by allowing tsconfig.json files to reference each other.

“Specifying these dependencies makes it easier to split your code into smaller projects, since it gives TypeScript (and tools around it) a way to understand build ordering and output structure,” Rosenwasser wrote. “That means things like faster builds that work incrementally, and support for transparently navigating, editing, and refactoring across projects. Since 3.0 lays the foundation and exposes the APIs, any build tool should be able to provide this.”

Perfect for a Mono repo :)

codegen

Hi!

I'm running codegen in my controller directory but i get the following error. What am i missing?

yarn codegen:generate
yarn run v1.7.0
$ apollo codegen:generate --queries=./src/**/*.tsx --schema=./schema.json --target=typescript ./src/schemaTypes.ts
› Error: For TypeScript and Flow generators, "output" must be empty or a single directory name, unless the "outputFlat" flag is set.
error Command failed with exit code 2.

I can't Start Server

When I'm enter yarn test, nothing work then enter yarn start, nothing work too
What can I do

Todos

Airbnb listing - "Airbnb has two ways for searching for listings. Guests can use search filters based on defined categories which are set by the hosts. Guests can also search in a text box on the nav panel which looks for key words in free form text in the listing descriptions. When you get to section 6 in the road map are you thinking about implementing one or both of these options for finding and viewing listings?"

Create listing form - "As you go through section 5 do you think you could do a multi-step form for the listing creation?"

Paypal/Stripe

Reservation and chat - "Another thought about this. Airbnb guests and hosts message one another in relation to a specific reservation rather than just in relation to the listing. From a psql table hierarchy you would have: message belongs to reservation belongs to listing belongs to a user (rather than message belongs to listing belongs to user). Just thought I'd highlight this nuance before you get started with implementing the database in case you want to do it this way. Related to your roadmap you'd need to create reservation request between section 6 and 7."

Reservation - "When guests send a reservation request to a host, they also send the first message by default alongside the reservation details. Then the guest and host speak to each other in the chat in relation to that specific reservation request. Once agreed, the host approves the reservation."

pre-approve, approve cycle with complex status of the reservation

Listing table

  • name
  • pictureUrl
  • description
  • price
  • latitude
  • longitude
  • amenities
  • beds
  • guests

No React Display

Hey,

Think I've done everything correctly, after starting the server and web just not seeing anything in browser. No errors on Chrome console.

Thanks,
Rich
Screen Shot 2019-08-31 at 2 15 30 PM

Features todo

  1. map, adding the location of the house in a map just like airbnb
  2. continuous integration/delivery: gitlab/travis ci -> heroku & netlify
  3. Listing and User update features on server and web
  4. caching for the backend (zero db reads, zero reads on submission) , similar to update caching shown in the udemy video "caching techniques" by the reddit founder!
  5. Server Pagination done properly on the server for web and app
    explore

Website cannot run

Hello,

i just did what it is written in the page but cannot run the website due to an error
ailed to compile.

/home/ian/super_app/fullstack-graphql-airbnb-clone/packages/web/src/modules/listing/shared/ListingForm.tsx
(71,11): An expression of type 'void' cannot be tested for truthiness

any suggestion?

Best regards,

Ian

Error when running Yarn Test

I've had this error recently when running Yarn Test and I was wondering if it could be related to my Postgress database or maybe my postgress user privileges, all other tests are passing.

 FAIL  src/modules/user/register/register.test.ts
  Register user
    ✕ check bad password (168ms)
    ✕ check bad password and bad email (8ms)
    ○ skipped check for duplicate emails
    ○ skipped check bad email

  ● Register user › check bad password

    expect(received).toEqual(expected) // deep equality

    - Expected
    + Received

      Object {
    -   "register": Array [
    -     Object {
    -       "message": "password must be at least 3 characters",
    -       "path": "password",
    -     },
    -   ],
    +   "register": null,
      }

      65 |     // catch bad password
      66 |     const response4 = await client.register(faker.internet.email(), "ad");
    > 67 |     expect(response4.data).toEqual({
         |                            ^
      68 |       register: [
      69 |         {
      70 |           path: "password",

      at Object.<anonymous> (src/modules/user/register/register.test.ts:67:28)
      at fulfilled (src/modules/user/register/register.test.ts:4:56)

  ● Register user › check bad password and bad email

    expect(received).toEqual(expected) // deep equality

    - Expected
    + Received

      Object {
        "register": Array [
          Object {
    -       "message": "email must be at least 2 characters",
    -       "path": "email",
    -     },
    -     Object {
            "message": "email must be a valid email",
            "path": "email",
    -     },
    -     Object {
    -       "message": "password must be at least 3 characters",
    -       "path": "password",
          },
        ],
      }

      77 |   it("check bad password and bad email", async () => {
      78 |     const response5 = await client.register("df", "ad");
    > 79 |     expect(response5.data).toEqual({
         |                            ^
      80 |       register: [
      81 |         {
      82 |           path: "email",

      at Object.<anonymous> (src/modules/user/register/register.test.ts:79:28)
      at fulfilled (src/modules/user/register/register.test.ts:4:56)

Test Suites: 1 failed, 1 total
Tests:       2 failed, 2 skipped, 4 total
Snapshots:   0 total
Time:        1.85s, estimated 2s
Ran all test suites.

Failed to compile

Failed to compile with the below error
C:/Work/MB/clientBi/src/controllers/modules/ChangePasswordController/index.tsx
Property 'data' does not exist on type 'void | FetchResult<ForgotPasswordChangeMutation, Record<string, any>, Record<string, any>>

How many dataloaders do we need ?

Hey, do you create 1 loader for each type of entity and that's enough? no need for separate loaders for subqueries? So if you query

{Article (where: {id: 1})
    {
        Comments  { id }  
    }
}

, if you have a CommentLoader that will load as only 2 SQL calls?

Or do we need a CommentByArticleLoader to only be used with this query?

Adding a Header

Hey love what you built here. There aren't a lot of apollo examples that don't store a jwt token in localstorage and use that to determine if a user is logged in, so glad to see a solution using sessions!

I'm curious to see how you would handle something like a Header component that's outside of your AuthRoutes, but that reflects the current auth state by either showing Login/Register or Logout. So when I log in, the header then knows to update and show the logout link.

so something like:

<ApolloProvider client={client}>
  <Header />
  <Routes />
</ApolloProvider>

Module not found: Can't resolve 'apollo-client'

Following Part 8 I am unable to start the web site, I'm getting this error after executing Yarn start

/home/foo/AirbnbBClone/node_modules/@apollo/react-hooks/lib/react-hooks.esm.js
Module not found: Can't resolve 'apollo-client' in '/home/foo/AirbnbBClone/node_modules/@apollo/react-hooks/lib'

I was wondering it it could be related to different versions between my code and those used in the video tutorial but I have not figured it out yet, though it looks like it is related with the Yarn workspace?

Heroku: Cannot find module '@babel/runtime/helpers/builtin/interopRequireDefault'

After deployment to Heroku I get the following error from the logs:

2020-08-30T00:12:15.679723+00:00 app[abb.1]: (node:3) UnhandledPromiseRejectionWarning: Error: Cannot find module '@babel/runtime/helpers/builtin/interopRequireDefault'

2020-08-30T00:12:15.679796+00:00 app[abb.1]: Require stack:

2020-08-30T00:12:15.679804+00:00 app[abb.1]: - /AirbnbBClone-Jeremy/packages/common/node_modules/yup/lib/index.js

2020-08-30T00:12:15.679810+00:00 app[abb.1]: - /AirbnbBClone-Jeremy/packages/common/dist/yupSchemas/user.js

2020-08-30T00:12:15.679811+00:00 app[abb.1]: - /AirbnbBClone-Jeremy/packages/common/dist/index.js

2020-08-30T00:12:15.679815+00:00 app[abb.1]: - /AirbnbBClone-Jeremy/packages/server/dist/modules/user/forgotPassword/resolvers.js

2020-08-30T00:12:15.679815+00:00 app[abb.1]: - /AirbnbBClone-Jeremy/packages/server/dist/utils/genSchema.js

2020-08-30T00:12:15.679815+00:00 app[abb.1]: - /AirbnbBClone-Jeremy/packages/server/dist/startServer.js

2020-08-30T00:12:15.679816+00:00 app[abb.1]: - /AirbnbBClone-Jeremy/packages/server/dist/index.js

2020-08-30T00:12:15.679816+00:00 app[abb.1]:     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1080:15)

2020-08-30T00:12:15.679816+00:00 app[abb.1]:     at Function.Module._load (internal/modules/cjs/loader.js:923:27)

2020-08-30T00:12:15.679817+00:00 app[abb.1]:     at Module.require (internal/modules/cjs/loader.js:1140:19)

2020-08-30T00:12:15.679817+00:00 app[abb.1]:     at require (internal/modules/cjs/helpers.js:75:18)

2020-08-30T00:12:15.679821+00:00 app[abb.1]:     at Object.<anonymous> (/AirbnbBClone-Jeremy/packages/common/node_modules/yup/lib/index.js:3:30)

2020-08-30T00:12:15.679821+00:00 app[abb.1]:     at Module._compile (internal/modules/cjs/loader.js:1251:30)

2020-08-30T00:12:15.679822+00:00 app[abb.1]:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1272:10)

2020-08-30T00:12:15.679822+00:00 app[abb.1]:     at Module.load (internal/modules/cjs/loader.js:1100:32)

2020-08-30T00:12:15.679822+00:00 app[abb.1]:     at Function.Module._load (internal/modules/cjs/loader.js:962:14)

2020-08-30T00:12:15.679822+00:00 app[abb.1]:     at Module.require (internal/modules/cjs/loader.js:1140:19)

2020-08-30T00:12:15.679823+00:00 app[abb.1]:     at require (internal/modules/cjs/helpers.js:75:18)

2020-08-30T00:12:15.679823+00:00 app[abb.1]:     at Object.<anonymous> (/AirbnbBClone-Jeremy/packages/common/dist/yupSchemas/user.js:3:13)

2020-08-30T00:12:15.679823+00:00 app[abb.1]:     at Module._compile (internal/modules/cjs/loader.js:1251:30)

2020-08-30T00:12:15.679823+00:00 app[abb.1]:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1272:10)

2020-08-30T00:12:15.679824+00:00 app[abb.1]:     at Module.load (internal/modules/cjs/loader.js:1100:32)

2020-08-30T00:12:15.679824+00:00 app[abb.1]:     at Function.Module._load (internal/modules/cjs/loader.js:962:14)

2020-08-30T00:12:15.679824+00:00 app[abb.1]: (Use `node --trace-warnings ...` to show where the warning was created)

2020-08-30T00:12:15.680346+00:00 app[abb.1]: (node:3) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

2020-08-30T00:12:15.680403+00:00 app[abb.1]: (node:3) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Apparently this can be solved by downgrading @babel/runtime but I can't find it in any project's package.json? Sorry for any inconvenience

update listing

  1. update listing mutation on server
  2. pick which listing to edit
  3. fetch data for that listing
  4. prefill form
  5. call update mutation

Blank page when launching dev

I have followed the steps listed in the README and launch the server and frontend with yarn start. However, when I navigate to localhost:3000, nothing is displayed. There's no errors in the console either, however I can see the GraphQL server on localhost:4000. I can confirm that the postgres DB and redis are running.

Any ideas on what the problem could be?

Bunch of small stuff

  1. Use Apollo CLI
  2. fix server tests
  3. build:web include @abb/controller
  4. as syntax for importing
  5. tslint for web

Demo website

Would it be possible to put a demo site in the readme?

tsconfig.json under controller have issue

Cannot write file 'c:/Users/HP/Desktop/abb/packages/controller/dist/index.d.ts' because it would overwrite input file.ts
Cannot write file 'c:/Users/HP/Desktop/abb/packages/controller/dist/index.d.ts' because it would overwrite input file.ts

Error when make yarn start on /server

Error when make $ yarn start
on /fullstack-graphql-airbnb-clone/packages/server

yarn run v1.19.1
warning package.json: No license field
$ cross-env NODE_ENV=development nodemon --exec ts-node src/index.ts
[nodemon] 1.17.5
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `ts-node src/index.ts`
query: START TRANSACTION
query: SELECT * FROM current_schema()
query: SELECT * FROM "information_schema"."tables" WHERE ("table_schema" = 'public' AND "table_name" = 'listings') OR ("table_schema" = 'public' AND "table_name" = 'users') OR ("table_schema" = 'public' AND "table_name" = 'messages')
query: SELECT *, "udt_name"::"regtype" AS "regtype" FROM "information_schema"."columns" WHERE ("table_schema" = 'public' AND "table_name" = 'listings') OR ("table_schema" = 'public' AND "table_name" = 'users') OR ("table_schema" = 'public' AND "table_name" = 'messages')
query: SELECT "ns"."nspname" AS "table_schema", "t"."relname" AS "table_name", "cnst"."conname" AS "constraint_name", "cnst"."consrc" AS "expression", CASE "cnst"."contype" WHEN 'p' THEN 'PRIMARY' WHEN 'u' THEN 'UNIQUE' WHEN 'c' THEN 'CHECK' END AS "constraint_type", "a"."attname" AS "column_name" FROM "pg_constraint" "cnst" INNER JOIN "pg_class" "t" ON "t"."oid" = "cnst"."conrelid" INNER JOIN "pg_namespace" "ns" ON "ns"."oid" = "cnst"."connamespace" INNER JOIN "pg_attribute" "a" ON "a"."attrelid" = "cnst"."conrelid" AND "a"."attnum" = ANY ("cnst"."conkey") WHERE "t"."relkind" = 'r' AND (("ns"."nspname" = 'public' AND "t"."relname" = 'listings') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'users') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'messages'))
query: SELECT "ns"."nspname" AS "table_schema", "t"."relname" AS "table_name", "i"."relname" AS "constraint_name", "a"."attname" AS "column_name", CASE "ix"."indisunique" WHEN 't' THEN 'TRUE' ELSE'FALSE' END AS "is_unique", pg_get_expr("ix"."indpred", "ix"."indrelid") AS "condition" FROM "pg_class" "t" INNER JOIN "pg_index" "ix" ON "ix"."indrelid" = "t"."oid" INNER JOIN "pg_attribute" "a" ON "a"."attrelid" = "t"."oid"  AND "a"."attnum" = ANY ("ix"."indkey") INNER JOIN "pg_namespace" "ns" ON "ns"."oid" = "t"."relnamespace" INNER JOIN "pg_class" "i" ON "i"."oid" = "ix"."indexrelid" LEFT JOIN "pg_constraint" "cnst" ON "cnst"."conname" = "i"."relname" WHERE "t"."relkind" = 'r' AND "cnst"."contype" IS NULL AND (("ns"."nspname" = 'public' AND "t"."relname" = 'listings') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'users') OR ("ns"."nspname" = 'public' AND "t"."relname" = 'messages'))
query: SELECT "con"."conname" AS "constraint_name", "con"."nspname" AS "table_schema", "con"."relname" AS "table_name", "att2"."attname" AS "column_name", "ns"."nspname" AS "referenced_table_schema", "cl"."relname" AS "referenced_table_name", "att"."attname" AS "referenced_column_name", "con"."confdeltype" AS "on_delete", "con"."confupdtype" AS "on_update" FROM ( SELECT UNNEST ("con1"."conkey") AS "parent", UNNEST ("con1"."confkey") AS "child", "con1"."confrelid", "con1"."conrelid", "con1"."conname", "con1"."contype", "ns"."nspname", "cl"."relname", CASE "con1"."confdeltype" WHEN 'a' THEN 'NO ACTION' WHEN 'r' THEN 'RESTRICT' WHEN 'c' THEN 'CASCADE' WHEN 'n' THEN 'SET NULL' WHEN 'd' THEN 'SET DEFAULT' END as "confdeltype", CASE "con1"."confupdtype" WHEN 'a' THEN 'NO ACTION' WHEN 'r' THEN 'RESTRICT' WHEN 'c' THEN 'CASCADE' WHEN 'n' THEN 'SET NULL' WHEN 'd' THEN 'SET DEFAULT' END as "confupdtype" FROM "pg_class" "cl" INNER JOIN "pg_namespace" "ns" ON "cl"."relnamespace" = "ns"."oid" INNER JOIN "pg_constraint" "con1" ON "con1"."conrelid" = "cl"."oid" WHERE "con1"."contype" = 'f' AND (("ns"."nspname" = 'public' AND "cl"."relname" = 'listings') OR ("ns"."nspname" = 'public' AND "cl"."relname" = 'users') OR ("ns"."nspname" = 'public' AND "cl"."relname" = 'messages')) ) "con" INNER JOIN "pg_attribute" "att" ON "att"."attrelid" = "con"."confrelid" AND "att"."attnum" = "con"."child" INNER JOIN "pg_class" "cl" ON "cl"."oid" = "con"."confrelid" INNER JOIN "pg_namespace" "ns" ON "cl"."relnamespace" = "ns"."oid" INNER JOIN "pg_attribute" "att2" ON "att2"."attrelid" = "con"."conrelid" AND "att2"."attnum" = "con"."parent"
query: COMMIT
query: SELECT "Listing"."id" AS "Listing_id", "Listing"."name" AS "Listing_name", "Listing"."category" AS "Listing_category", "Listing"."pictureUrl" AS "Listing_pictureUrl", "Listing"."description" AS "Listing_description", "Listing"."price" AS "Listing_price", "Listing"."beds" AS "Listing_beds", "Listing"."guests" AS "Listing_guests", "Listing"."latitude" AS "Listing_latitude", "Listing"."longitude" AS "Listing_longitude", "Listing"."amenities" AS "Listing_amenities", "Listing"."userId" AS "Listing_userId" FROM "listings" "Listing"
Error: listen EADDRINUSE :::4000
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at Server.setupListenHandle [as _listen2] (net.js:1367:14)
    at listenInCluster (net.js:1408:12)
    at Server.listen (net.js:1492:7)
    at /home/hax0r/Desktop/fullstack-graphql-airbnb-clone/node_modules/graphql-yoga/src/index.ts:368:22
    at new Promise (<anonymous>)
    at GraphQLServer.start (/home/hax0r/Desktop/fullstack-graphql-airbnb-clone/node_modules/graphql-yoga/src/index.ts:366:12)
    at Object.<anonymous> (/home/hax0r/Desktop/fullstack-graphql-airbnb-clone/packages/server/src/startServer.ts:116:28)
    at Generator.next (<anonymous>)
    at fulfilled (/home/hax0r/Desktop/fullstack-graphql-airbnb-clone/packages/server/src/startServer.ts:4:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
[nodemon] app crashed - waiting for file changes before starting...

Error after deployment

Getting this error in the console after executing all steps in readme, last step (yarn start in packages/web):

client.js:426 WebSocket connection to 'ws://localhost:4000/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

heroku todo

  1. Import message entity
  2. Fix yarn build in server
  3. Post install
  4. Procfile
  5. Switch to stable heroku
  6. Add frontend_host env var
  7. Fix pubsub redis

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.