This project provides an API for the Dogs platform, a social media network for dogs built purely for fun.
This project uses the following technologies:
The API was built using Node.js and Typescript, with Kysely as the query builder to explore its capabilities. Additionally, the application is deployed on Vercel, where we not only use a database but also leverage Vercel Blob Storage for image uploads.
This project is live at https://dogs.mayconsacht.com. You can access it through the website, but if you prefer to run it locally, I recommend setting up a PostgreSQL instance on Vercel, as you'll also need to create a Vercel Blob Storage to configure the token for image uploads.
Once you've created the database instance and the blob storage, follow these steps:
- Clone the repository:
git clone https://github.com/mayconsacht/dogs-server.git
cd dogs-server- Create a
.env.localfile and configure the following variables:
POSTGRES_DATABASE=#your database
POSTGRES_HOST=#your database host
POSTGRES_PASSWORD=#your database password
POSTGRES_URL=#your database url
POSTGRES_USER=#your database user
BLOB_READ_WRITE_TOKEN=#your vercel blob token
JWT_SECRET=#any secret
CLIENT_URL=#http://localhost:3001 if you are running the client locally
NODE_ENV=development- Install the dependencies:
yarn install- Execute the migration to create the database tables:
yarn migrateAfter installing the dependencies, start the development server with the following command:
yarn devTo build the application for deployment, you can use:
yarn buildThis project is licensed under the MIT License.