Skip to content

MichalStaszkiewicz/wordy-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Wordy Server 🚀

The Wordy Server is the backbone of the Wordy application, providing the API endpoints that the Wordy frontend interacts with. Developed using TypeScript and Hapi, the server seamlessly facilitates data exchange and communication between the client and the backend.

Prerequisites ⚙️

Before diving into the installation and running of the Wordy Server, ensure that you have the following prerequisites in place:

  • Node.js and npm: Your system must have Node.js and npm installed. If you haven't already, download and install them.
  • PostgreSQL Database: Set up a PostgreSQL database (e.g., pgAdmin) named 'wordydb'. Create a Postgres user with the username 'postgres' and password '1337'. Ensure the database is running on the default PostgreSQL port, 5432.

Configuration ⚙️

  1. Create .env file: In the project directory, create a file named .env. This file will hold the sensitive environment variables required for running the server.
NODE_ENV=development
DB_LOGIN  = "TYPE_LOGIN_TO_WORDY_DB"
DB_PASSWORD = "TYPE_PASSWORD_TO_WORDY_DB"
DB_HOST  = "127.0.0.1"
DB_PORT = "TYPE_YOUR_DB_PORT"
SECRET = "TYPE_YOUR_SECRET_KEY"

Installation and Running 🧰

  1. Repository Cloning: Clone the Wordy Server repository from GitHub using the command git clone
https://github.com/MichalStaszkiewicz/wordy-server.git
  1. Open a terminal and navigate to the project directory.
  2. To install the required dependencies run:
  npm install
  1. To start the server in development mode run:
npm run dev
  1. Server Verification: Upon successful server startup, you should see the message "Server running at: http://localhost:1344" in the console.

Documentation 📖

The Wordy Server API documentation is available at the '/docs' endpoint.