Zidence is a simple property listing application. This repo is the backend API part with Node.js tooling ecosystem.
- Node.js
- Express
- Prisma
- PostgreSQL
yarn
yarn migrate
# prisma migrate dev --preview-feature
yarn migrate:reset
# prisma migrate reset --preview-feature
yarn generate
# prisma generate
yarn dev
# nodemon src/index.js
Open http://localhost:4000
yarn start
# node src/index.js
Open http://localhost:4000
yarn migrate:deploy
# prisma migrate deploy --preview-feature
You can access the REST API of the server using the following endpoints:
/users
: Get all users/properties
: Get all properties/properties/:slug
: Get a single property by itsslug
/auth/register
: Register a new user- Body:
email: String
(required): The email address of the userhandle: String
(required): The handle/username of the username: String
(required): The name of the userpasswrod: String
(required): The password of the user
- Body:
/properties
: Create a new property- Body:
name: String
(required): The name of the propertyslug: String
(required): The slug of the propertydescription: String
(optional): The description of the propertyuserId: String
(required): Theid
of the user that creates the property
- Body:
/property/:slug
: Delete a property by itsslug