https://github.com/biancahpp/messenger-2473
https://github.com/biancahpp/messenger-2473
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/biancahpp/messenger-2473
- Owner: biancahpp
- Created: 2021-09-09T19:23:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-19T21:01:13.000Z (over 3 years ago)
- Last Synced: 2025-01-23T01:35:22.961Z (4 months ago)
- Language: JavaScript
- Size: 6.39 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Messenger
A one-to-one realtime chat app.
[](https://gitpod.io/from-referrer/)
## Initial Setup
Create the PostgreSQL database (these instructions may need to be adapted for your operating system):
```
psql
CREATE DATABASE messenger;
\q
```Create a `.env` file in the server directory and add the following variables (make any modifications to fit your local installation):
```
SECRET_KEY="YourSecretKey"
ENV="development"
POSTGRES_ENGINE="django.db.backends.postgresql_psycopg2"
POSTGRES_HOST="localhost"
POSTGRES_PORT=5432
POSTGRES_DATABASE="messenger"
POSTGRES_USER="user"
POSTGRES_PASSWORD="password"```
In the server folder, install dependencies and then seed the database (you may want to use a virtual environment):
```
cd server
pip install -r requirements.txtpython manage.py makemigrations
python manage.py migratepython manage.py shell
from messenger_backend.seed import seed
seed()
exit()```
In the client folder, install dependencies:
```
cd client
npm install
```### Running the Application Locally
In one terminal, start the front end:
```
cd client
npm start
```In a separate terminal, start the back end:
```
cd server
python manage.py runserver
```### Running Tests on the Server
```
cd server
python manage.py test
```