https://github.com/robpruzan/wecode
https://github.com/robpruzan/wecode
django postgresql react typescript
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/robpruzan/wecode
- Owner: RobPruzan
- Created: 2022-12-17T20:19:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-17T08:05:43.000Z (over 3 years ago)
- Last Synced: 2025-03-24T20:33:32.151Z (over 1 year ago)
- Topics: django, postgresql, react, typescript
- Language: TypeScript
- Homepage: https://main.dlj9861zt9mlo.amplifyapp.com/
- Size: 1.9 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Welcome to the programmers network!
This social media app specifically designed for coders to connect and share ideas.
Link- https://main.dlj9861zt9mlo.amplifyapp.com/
## Setup
To get started, make sure you have Python and Typescript installed on your machine.
### Database
Install neccesary dependencies for django postgres intergration (with brew)
```
brew install postgresql
```
Start up postgres
```
brew services start postgresql
```
Create db
```
createdb
```
Create user and password
```
psql
=# CREATE USER WITH PASSWORD ''
=# GRANT ALL PRIVILEGES ON DATABASE postgres TO ;
```
To confirm the role exists run the following commands and the role should appear
```
psql
\du
```
#### Python
1. Install the necessary requirements by running the following command:
```
pip install -r requirements.txt
```
## Django X Postgres
We need to connect django to our Postrgres DB
To do this navigate to local_settings.py
From root of the project navigate to backend/backend
Within local_settings.py place your DB information used earlier to create your DB
```
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql_psycopg2",
"NAME": "",
"USER": "",
"PASSWORD": "",
"HOST": "localhost",
"PORT": "5432",
}
}
```
3. Run the following commands to migrate the database:
```
python3 manage.py makemigrations
python3 manage.py migrate
```
### Starting the server
To start the django server run this command:
```
python3 manage.py runserver
```
If this command fails for any reason make sure you:
- Have installed the neccesary dependencies
- Are in your virtualenv (if you are using one)
- Are in the right directory (WeCode/backend)
- Spelled the command correctly
#### Typescript
1. Navigate to the web directory:
```
cd web
```
2. Install the necessary packages by running the following command:
```
npm install
```
3. Start the development server by running the following command:
```
npm run start
```
And that's it! You should now be able to access the social network at http://localhost:3000.
Thanks for choosing the Engineer's Social Network!