Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/agust613/don_bosco_labs_back
Don Bosco Clinical Laboratory Backend
https://github.com/agust613/don_bosco_labs_back
api-rest backend dotenv express http nodejs postgres requests typescript
Last synced: 20 days ago
JSON representation
Don Bosco Clinical Laboratory Backend
- Host: GitHub
- URL: https://github.com/agust613/don_bosco_labs_back
- Owner: AgusT613
- Created: 2024-04-02T20:29:07.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-04-18T13:36:14.000Z (9 months ago)
- Last Synced: 2024-11-09T15:37:43.547Z (3 months ago)
- Topics: api-rest, backend, dotenv, express, http, nodejs, postgres, requests, typescript
- Language: TypeScript
- Homepage:
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Clinical Laboratory - Backend Project
## Installation
- Clone and install dependencies
```bash
git clone https://github.com/AgusT613/don_bosco_labs_backcd don_bosco_labs_backend
npm install
```- Create a `.env` file
```bash
EXPRESS_PORT = your_express_port # Ex. 8080
# Postgres Connection
PG_HOST = "your_postgres_host"
PG_USER = "your_postgres_user"
PG_PASSWORD = "your_postgres_password"
PG_DATABASE = "your_database_name" # Ex. DonBoscoLabs
PG_PORT = your_postgres_port # By default postgres uses 5432 port
# Frontend Allowed Origin
ALLOWED_ORIGIN = "your_frontend_origin_url"
```- Create the database with postgres using `psql` or `pgAdmin`
- You can copy the sql code on `src/api/db/db.sql````sql
CREATE DATABASE "DonBoscoLabs";CREATE TABLE IF NOT EXISTS staff (
user_id SERIAL PRIMARY KEY,
name varchar(45) DEFAULT NULL,
surname varchar(45) DEFAULT NULL,
address varchar(50) DEFAULT NULL,
dni varchar(8) DEFAULT NULL,
email varchar(45) NOT NULL,
password varchar(100) NOT NULL,
entry_date date DEFAULT NULL,
area_id int DEFAULT NULL,
job_position_id int DEFAULT NULL
);INSERT INTO staff (email, password) VALUES ('[email protected]', 'andres123456789'), ('[email protected]', 'maria123456789');
```- Transpile the proyect from TS to JS
```bash
npm run build
```- So as to finally run the project using:
```bash
npm run dev
```