Skip to content

marcusholmgren/tinyhouse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tinyhouse

Node.js CI

Fullstack React home sharing application, https://www.newline.co/tinyhouse

Getting started

Install all dependencies with yarn or npm. This is the same for both client and server project.

yarn install

Server

A Apollo Server with MongoDB backend for storing rental houses.

All server code is located in the /server folder.

Configure your environment variables

Create a environment variable, .env file in the /server folder:

PORT=9000
DB_USER=<username>
DB_USER_PASSWORD=<password>
DB_CLUSTER=<mongodb cluster>
G_CLIENT_ID=<Google OAuth client id>
G_CLIENT_SECRET=<Google OAuth API secret>
PUBLIC_URL=<http://localhost:3000>
SECRET=<some secret text>
NODE_ENV=<development for local dev>

After you have configured your variables you can seed with some mock data

yarn seed

Run & build

Start the server with yarn.

yarn start

In development mode you can access the GraphQL Playground on URL http://localhost:9000/api/

Create a production build with yarn.

yarn build

Client

A React Apollo Client that display rental listings.

All client code is located in the /client folder.

Start the client with yarn.

yarn start

The client uses Apollo CLI to generate types from the server API.

Read the server API schema and stores it locally to the client.

yarn codegen:schema

Reads the local schema file and generate types where GraphQL queries are defined.

yarn codegen:generate

About

Fullstack React home sharing application, https://www.newline.co/tinyhouse

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published