A simple app showcasing Apollo graphQL Server and Client, Express and Knex with PostgreSQL.
There is a .env
file in the root of application.
Should you decide to change the configuration in the file make sure you update the scripts\db.sql
script otherwise, the application would not be able to connect to your database.
Inside the application root folder, in your terminal, type the following:
yarn install
or
npm install
yarn test
or
npm run test
-
Change in the scripts directory
-
Using
psql
, and still in the scripts directory,connet
to apostgres
instance. Once connected to youdatabase
, create database objects from the db.sql in the folder like the following: -
\i db.sql
From the application root folder, run
yarn build
or
npm run build
The above will generate a dist
folder. Inside the folder is a production ready app including the frontend and the backend.
Change into the generated dist
folder and type the following:
node app.server.js
Alternatively, you could use:
yarn start
or
npm start
The above would build and run the application.
Thank you.