DOG-DB is a project that includes an Express server written in TypeScript. The server provides a basic endpoint at '/', responding with "Hello World!".
Before running the project, make sure you have Node.js and npm (or yarn) installed on your machine. For local database instance, have docker installed.
There's a docker-compose.yaml file at the top of the project that has the postgres database service defined. Assuming docker is installed, you can run
docker-compose up -d
which should turn on the postgres db. When the postgres image boots up, it will run the T-SQL in the /scripts/init.sql file to create the schema and table and test data if it doesn't already exist. The data should remain persistent when stopping the container, but if you want to start fresh, you can do a
docker-compose down -v
where the -v argument will drop the data volumes, deleting all the database data.
-
Clone the repository:
git clone https://github.com/dogdb-org/dobdb-backend.git
-
Navigate to the project directory:
cd dogdb-backend
- Initialize the project:
npm install
or
yarn
- Build the project to make sure the .env configuration files will be loaded up and working.
npm run build
To run the server, use the following npm (or yarn) scripts:
For production:
npm start
or
yarn start
For development with automatic restart (using nodemon):
npm run dev
or
yarn dev
To connect to the Supabase server, please contact the project maintainers:
LMD Adam
at Discord server
This project is licensed under the MIT License - see the LICENSE file for details.