This is a sample project that uses Hapi.js, Node.js, PostgreSQL, and Knex.js.
Before running the application, you need to have the following installed:
- Node.js (version v14.18.2 or higher)
- PostgreSQL
To install the application, follow these steps:
- Clone the repository to your local machine.
- Install dependencies by running
npm install
in the project directory. - Prepare environment variable like following:
- PORT = server port (optional | default to 3000)
- HOST = server host (optional | default to localhost)
- PG_HOST = database host (optional | default to localhost)
- PG_USER = database username
- PG_PASSWORD = database password
- Create a PostgreSQL database with the name
resume_db
and configure the username and password accordingly. - Run the database migrations by running
npm run migrate:latest
. - Run the database seeds by running
npm run seed:up
. - Start the application by running
npm start
. - The server will start at http://localhost:3000.
Once the server is running, you can access the API at http://localhost:3000/overall.
To run the application in development mode, run npm run start
. This will start the server with nodemon, which will automatically restart the server when changes are made.
This project is licensed under the MIT License. See the LICENSE file for details.