-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/favorite-companies
- Loading branch information
Showing
8 changed files
with
72 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
name: Deploy to Railway | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
container: ghcr.io/railwayapp/cli:latest | ||
env: | ||
SVC_ID: f15b9190-b8f5-4122-9418-8e509e648783 | ||
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: railway up --service=${{ env.SVC_ID }} | ||
deploy: | ||
runs-on: ubuntu-latest | ||
container: ghcr.io/railwayapp/cli:latest | ||
env: | ||
SVC_ID: f15b9190-b8f5-4122-9418-8e509e648783 | ||
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: railway up --service=${{ env.SVC_ID }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,45 @@ | ||
Kinfolx: An app that allows you rate companies based on their diversity & company culture. | ||
# Kinfolx | ||
|
||
Make sure to use npm install to install all Dependencies. | ||
## An app that allows you rate companies based on their diversity & company culture. | ||
|
||
you will also need to cd into the server file and do npm install as well because the front and back end have two different package.json files. | ||
View our app live : https://kinfolx-production.up.railway.app/ | ||
|
||
## Instructions to run the code locally | ||
|
||
Make sure to use `npm install` to install all Dependencies. | ||
:exclamation: You will also need to cd into the server file and do npm install as well because the front and back end have two different package.json files. | ||
|
||
### Running the servers | ||
|
||
1. Start the frontend server: | ||
|
||
``` | ||
bash | ||
npm i | ||
npm run dev | ||
``` | ||
|
||
2. Start the backend server: | ||
|
||
``` | ||
bash | ||
cd server | ||
npm i | ||
npm run dev | ||
``` | ||
|
||
1. Start the backend server: | ||
```bash | ||
cd server | ||
npm i | ||
npm run dev | ||
``` | ||
2. Start the frontend server: | ||
```bash | ||
npm i | ||
npm run dev | ||
``` | ||
3. Open your browser and go to `http://localhost:5173` | ||
The backend server is loading from `http://localhost:3000` | ||
The backend server is loading from `http://localhost:3000` | ||
|
||
### Environment Variables | ||
|
||
One ENV goes inside of the config file inside the server and the other ENV is in the root | ||
|
||
``` | ||
VITE_CLERK_PUBLISHABLE_KEY=clerk_key_here | ||
DB_STRING=mongodb_string_here | ||
CLERK_SECRET_KEY=clerk_secret_key_here | ||
CLERK_PUBLISHABLE_KEY=clerk_publishable_key_here | ||
``` | ||
|
||
Front end needs "VITE_" prefixing all keys | ||
Front end needs "VITE\_" prefixing all keys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import Company from '../models/Company.js' | ||
|
||
const companyController = { | ||
getAllCompanies: async (req, res, next) => { | ||
try { | ||
const companies = await Company.find({}) | ||
console.log(companies) | ||
res.json({ companies }) | ||
} catch (error) { | ||
next(error) | ||
} | ||
}, | ||
} | ||
|
||
export default companyController |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
import express from 'express' | ||
const companyRouter = express.Router() | ||
import companyController from '../controllers/company.js' | ||
|
||
companyRouter.get('/', companyController.getAllCompanies) | ||
|
||
export default companyRouter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,5 +25,5 @@ | |
} | ||
a { | ||
text-decoration: none; | ||
color: inherit | ||
color: inherit; | ||
} |
16 changes: 8 additions & 8 deletions
16
src/components/CompanyReviewSummary/companyReviewSummary.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
.content-box { | ||
padding: 3rem; | ||
background-color: #333; | ||
border-radius: 4px; | ||
border: 1px solid #444; | ||
color: #e0e0e0; | ||
font-size: 1.8rem; | ||
} | ||
.content-box { | ||
padding: 3rem; | ||
background-color: #333; | ||
border-radius: 4px; | ||
border: 1px solid #444; | ||
color: #e0e0e0; | ||
font-size: 1.8rem; | ||
} |