Giter Site home page Giter Site logo

ubuntu's Introduction

ubuntu

Glasgow Graduation Project - Women Shelter system

Getting started

  1. Add upstream repo [email protected]:CodeYourFuture/ubuntu.git
  2. Check if upstream has been added git remote -v
  3. Create branch git checkout -b setup Do everything in your branch

Running the project locally

  • If you have not done so, setup the database first so it runs locally as a process (See Database section below)
  • First time (and then each time you update the schema) run npm run recreate-db
  • Run npm start from top-level (root folder)

Workflow

Our workflow is a variation of Gitflow

  1. Pick a card from trello (assign it to yourself and make sure there is enough description)

  2. Locally, switch to master, then git pull upstream master. NOTE: If you get a merge message, that means you made a mistake and you worked on master by accident. Clean your master (i.e. git reset --hard previous_commit - ask a mentor to help)

  3. Create a branch based on the story git checkout -b feature-title.

If you're working on a feature for adding a student, then name the branch add-student for example.

  1. Work on the branch (add, commit and push)

  2. Create a Pull Request when you are finished.

  3. Repeat.

Database

Switch to the postgres system user: sudo -i -u postgres

Launch postgresql client: psql

The first time you create the database, you will need to run these commands (three of them separately) in psql

DROP ROLE IF EXISTS cyf;
CREATE USER cyf WITH PASSWORD 'password';
CREATE DATABASE ubuntu OWNER cyf;

You can verify role has been added correctly: \du Switch to ubuntu DB: \c ubuntu

Command for getting into ubuntu database directly as the cyf user psql -U cyf ubuntu

Updating DB schema

We use knex for changing the DB schema

knex

Schema file you need to change the DB: server/migrations/20180811161248_base-schema.js

Once you change it run: npm run recreate-db

ubuntu's People

Contributors

yjohn avatar lslykng avatar kabaros avatar khaledkzy avatar rarmatei avatar azadi11 avatar alastair87 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.