Live Site: chirpchirp
chirpchirp is a full-stack clone of Twitter. Users can view chirps as well as send, edit, and delete their own. Users can also comment on other users chirps.
- Clone this repository:
git clone https://github.com/apizarro23/chirpchirp.git
- Install backend dependencies:
pipenv install -r requirements.txt
- Create a
.env
file based on the example with proper settings for development environment:
SECRET_KEY=INSERT_SECRET_KEY_HERE
DATABASE_URL=sqlite:///dev.db
- Start pipenv, migrate database, seed database, and run Flask app:
pipenv shell
flask db upgrade
flask seed all
flask run
- Install frontend dependencies:
cd react-app/
npm install
npm start
- Navigate to localhost:3000
Command | Purpose |
---|---|
pipenv shell |
Open your terminal in the virtual environment and be able to run flask commands without a prefix |
pipenv run |
Run a command from the context of the virtual environment without actually entering into it. You can use this as a prefix for flask commands |
flask db upgrade |
Check in with the database and run any needed migrations |
flask db downgrade |
Check in with the database and revert any needed migrations |
flask seed all |
Just a helpful syntax to run queries against the db to seed data. See the app/seeds folder for reference and more details |
heroku login -i |
Authenticate your heroku-cli using the command line. Drop the -i to authenticate via the browser |
heroku authorizations:create |
Once authenticated, use this to generate an Oauth token |
heroku run -a <app name> |
Run a command from within the deployed container on Heroku |