Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cordxapp/dns
CordX DNS is a comprehensive RESTful API for managing our Custom Domains.
https://github.com/cordxapp/dns
dns-server fastify prisma
Last synced: 26 days ago
JSON representation
CordX DNS is a comprehensive RESTful API for managing our Custom Domains.
- Host: GitHub
- URL: https://github.com/cordxapp/dns
- Owner: CordXApp
- License: agpl-3.0
- Created: 2024-01-25T12:21:42.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-05-18T09:49:53.000Z (9 months ago)
- Last Synced: 2024-05-18T22:42:09.515Z (9 months ago)
- Topics: dns-server, fastify, prisma
- Language: TypeScript
- Homepage: https://dns.cordx.lol
- Size: 139 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# CordX DNS
CordX DNS is a comprehensive RESTful API for managing our Domain Name System.---
### Router
The router is a key component of our application. It is responsible for directing incoming requests to the appropriate handler functions based on the request's URL and HTTP method.Our router is set up to handle routes listed at [dns.cordx.lol/docs](https://dns.cordx.lol/docs)
Each route is associated with a handler function located in the [handlers](./src/server/handlers/) directory. These handler functions interact with the model layer of our application to retrieve or modify data.
For more information about how our router is implemented, please refer to the source code in the [routes](./src/server/routes/) directory.
---
### Prisma
Prisma is an open-source database toolkit. It replaces traditional ORMs and makes database access easy with an auto-generated and type-safe query builder that's tailored to your database schema. Here are some commands you might find useful:
- `db:init`: This command generates Prisma Client based on our [Prisma Schema](./src/prisma/schema.prisma). Prisma Client is an auto-generated database client that enables type-safe database access and reduces boilerplate. You can think of it as a query builder that you can use to build database queries in TypeScript or JavaScript.
- `db:push`: This command pushes the state of our [Prisma Schema](./src/prisma/schema.prisma) to our database without using migrations. It creates the database if it doesn't exist, creates the schema if it doesn't exist, and updates the schema to match our Prisma schema. This command is ideal for prototyping and local development where you don't need to version schema changes.
To run these commands, use your terminal and make sure you're in the root directory of the project.
---
## Getting Started
To get the application up and running, you'll need to run a few commands. Here's what each command does:
- `app:build`: This command runs the TypeScript compiler (`tsc`) which compiles your TypeScript code into JavaScript. The output is typically placed in a directory named `build`.
- `app:dev`: This command runs your application in development mode using `nodemon`. `nodemon` is a utility that automatically restarts your application whenever file changes in the directory are detected, making it useful for development.
- `app:prod`: This command runs the compiled JavaScript code in production mode. It starts the Node.js application using the compiled `app.js` file in the `build` directory.
To run these commands, use your terminal and make sure you're in the root directory of the project.