- Node.JS
- Preferrably an IDE/Code editor that supports an ESLint plugin
- Git (Obviously)
- Postgres (Installed, setup script will create database if you haven't already)
-
Clone this repository
git clone https://github.com/clickpop/backtalk-api.git
-
Enter repository
cd backtalk-api
-
Make sure Postgres is installed / running
-
Update
.env
file with appropriate Postgres settings -
Setup the project using one of the following:
-
DON'T HAVE THE DATABASE YET (you'll still need Postgres running)
npm run setup
-
HAVE A DATABASE AND WANT TO WIPE IT OUT:
npm run setup:clean
-
HAVA A DATABASE AND WANT TO KEEP THE DATA INTACT (will add new migrations)
npm run setup:keep
-
-
Start the server
npm run dev
npm install
Installs all dependanciesnpm start
Starts the API server NOTE: Just usenpm run dev
from belownpm run dev
- Starts the development server with hot-reloadingnpm run db:create
- Creates the database for you based on your .env filenpm run db:drop
- Drops the database for you based on your .env filenpm run db:recreate
- Drops then creates the database for you based on your .env filenpm run migrate
- Runs all un-run migrations to setup your databasenpm run migrate:fresh
- Runs all migrations to setup your databasenpm run seed
- Runs all un-run seeders to seed your databasenpm run seed:fresh
- Runs all seeders to seed your databasenpm run setup
- Installs all dependancies then runs db:create, migrate, and seednpm run setup:clean
- Installs all dependancies then runs db:recreate, migrate, and seednpm run setup:clean-no-install
- Runs db:recreate, migrate, and seednpm run setup:keep
- Installs all dependancies then runs migrate and seednpm test
- Runs all testsnpm test:verbose
- Runs all tests in verbose modenpm test:watch
- Runs all tests in watch mode to re-test every time you make a changenpm lint
- Runs the linter in-case your IDE doesn't have built in ESLint supportnpm format
- Runs the code formatter in-case your IDE doesn't have built in Prettier supportnpm run docker-up
- Runs this docker-compose up command for the backendnpm run docker-down
- Runs this docker-compose down command for the backendnpm run docker-up:combined
- Runs this docker-compose up command for the backend and frontend See A Note on Docker section belownpm run docker-down:combined
- Runs this docker-compose down command for the backend and frontend See A Note on Docker section below
Feel free to use the docker npm scripts we have setup. Just be sure that all of the stuff labeled under the Database and Docker sections of the .env are filled in with the correct information.
If you want this to also handle the frontend you just need to clone the backtalk-ui repo into a folder called 'client'. The npm run docker-up:combined
command will handle the rest.
If you need help with this, please feel free to reach out.
Note: We will not accept any PR's that don't follow our Guidelines
This project now utilizes Git-Flow. Internally, we use HubFlow as a CLI tool to help manage our Git-Flow feature, release, and hotfix branches. While not necessary, it is highly recommended that you utilize a similar CLI tool, to help enforce the guidelines we've outlined in the Backtalk Contributing Guidelines.
While you're reading things, you should probably also check out our Code of Conduct.