Bedrock is a React-Redux starter kit.
Bedrock utilizes environment variables for running the application locally and in production. Environment variables can be declared locally by adding them to your .profile
export DATABASE_URL=postgres://user:pass@localhost
From within the root directory:
npm install
ESLint is used for linting as it plays nicely with React and JSX. Bedrock linting adheres to the Airbnb Stlye Guide and the react plugin (both are included as dev-dependencies). The ESLint settings can be seen in .eslintrc.json
.
First, install ESLint globally:
npm install -g eslint
Next, add the following packages for integration with SublimeText. The easiest way to add these is via "Package Control":
Note: Restart Sublime Text!!!
From within the root directory:
// Run local development environment
npm start
// Run tests
npm test
From within the root directory
// Intialize postgres database
initdb db/
// Create Local Databases
createdb development
createdb test
// Verify knex CLI
knex --version
// If not installed
npm install knex -g
// Get latest version of database
knex migrate:latest
//If testing
knex migrate:latest --env test
// Update database
knex migrate:make addNewFeatureNameToTableName
An Example migration file
exports.up = (knex, Promise) => {
return Promise.all([
knex.schema.table('todos', (table) => {
table.string('somethingElse').notNullable();
}),
]);
};
exports.down = (knex, Promise) => {
return Promise.all([
knex.schema.table('todos', (table) => {
table.dropColumn('somethingElse');
}),
]);
};
View the project roadmap here.
See CONTRIBUTING.md for contribution guidelines.