This is the back-end server and database for EmployIn React Native app.
This server is running a PostgreSQL database with node version 12.22.3
This project was developed and ran on apple and linux computers
- body-parser ^1.19
- cors ^2.8.5
- dotenv ^10
- express ^4.17.1
- helmet ^4.6
- morgan ^1.10
- pg ^8.7.1
-
Go to the root directory and run
npm install
-
Set up your working environment by making a copy of
.env.example
to.env
in the same folder and replace all variables to match your system's configuration. (For more information on.env
, click here) -
Go to the root folder of the repo and run
psql -U <PGUSER> -h <PGHOST> <PGDATABASE>
-
Once inside your psql environment, run
\i src/db/schema/01_create_tables.sql;
to create tables and seed data. -
Open another terminal or command prompt and run
npm start
to start the server. -
Go to your web browser and navigate to
http://localhost:7001
to begin API requests.
You can use the JSON Formatter Google extension or the Insomnia app to make the data easier to read.
GET /api/applicant
Response
[
{
"id": 1,
"name": "Fynn Hartley",
"phone_number": "(514)288-8050",
"email": "[email protected]",
"summary": "Lorem ipsum",
"experience": "HR Administration & Compliance",
"img_url": "https://randomuser.me/api/portraits/men/55.jpg"
}
]
GET /api/applicant_links
Response
[
{
"id": 7,
"applicant_id": 3,
"web_link": "https://ca.linkedin.com/"
}
]
GET /api/applicant_industry
Response
[
{
"id": 5,
"industry_id": 10,
"job_application_id": 5,
"applicant_id": 5
}
]
GET /api/business
Response
[
{
"id": 3,
"name": "Educate",
"summary": "Supporting child care centres, preschools, daycares, before and after school programs, kids camps and more to meet their staffing needs for over 10 years.",
"img_url": "https://media-exp1.licdn.com/dms/image/C560BAQHSUE33Kd_mow/company-logo_200_200/0/1561548806681?e=2159024400&v=beta&t=LgVPaq1aL2Eo0PKAwW0-22zY34M4dgC5Sp-7Gws55-o"
}
]
GET /api/industry
Response
[
{
"id": 4,
"name": "Pharmaceutical"
}
]
GET /api/job_application
Response
[
{
"id": 3,
"job_posting_id": 3
}
]
GET /api/job_posting
Response
[
{
"id": 3,
"position": "Early Childhood Educator\n",
"job_description": "We are in search for team members who are passionate in teaching children and making a difference in children’s lives.",
"business_id": 3,
"industry_id": 2
}
]