Coder Social home page Coder Social logo

resto_dev's Introduction

Project Setup Guide

This guide helps you set up the necessary environment to run the project locally.

1. Database Setup

Follow these steps to set up the PostgreSQL database:

  • Install PostgreSQL:

    • Linux:

      sudo apt install postgresql postgresql-contrib
    • Mac (using Homebrew):

      brew install postgresql
    • Windows:

    • Download PostgreSQL: Download PostgreSQL version 16.2 from EnterpriseDB.

    • Installation Process:

      • Uncheck "Stack Builder" when prompted to select components to save time.
      • Use port 5432 when prompted for port selection.
      • Set the temporary password for the superuser as "123123123" when prompted.
  • Start PostgreSQL service:

    • Linux and Mac:

      sudo systemctl start postgresql.service
    • Windows: Start PostgreSQL service from the Services panel.

  • Create a PostgreSQL role and database:

    • Linux and Mac: To create a PostgreSQL role and database on Linux and Mac, execute the following commands in your terminal:

      sudo -u postgres psql -c "CREATE ROLE root WITH SUPERUSER CREATEDB CREATEROLE PASSWORD '123123123';โ€
      sudo -u postgres createdb -O root resto_dev
    • Windows: After PostgreSQL installation:

      • Create a user/role named "root" with the password "123123123".
      • Create a database (not a schema) named "resto_dev".

      For detailed instructions, you can refer to this guide: How to Create PostgreSQL Database and Users using psql and pgAdmin.

2. Application Setup

Follow these steps to set up the application:

  • Install Node.js version 16.20.2:

    • Linux:

      curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
      sudo apt-get install -y nodejs | sudo apt-get install -y nodejs=16.20.2
    • MacOS:

      Install Homebrew:

      If Homebrew is not already installed on your system, you can install it by running the following command in your terminal:

      /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

      Install Node.js:

      Once Homebrew is installed, you can use it to install Node.js version 16.20.2. Run the following commands in your terminal:

      brew install [email protected]
      brew unlink node
      brew link [email protected]

      After installation, verify that Node.js version 16.20.2 is installed by running:

      node -v

      If needed, you can use the --overwrite flag with brew link to force linking, for example:

      brew link --overwrite [email protected]

      Why unlink and then link again?

      Unlinking and then linking again is necessary to set Node.js version 16.20.2 as the active version. This ensures that any existing installations of other Node.js versions do not interfere.

      If both Node.js and Node.js version 16.20.2 are installed, unlinking the current version and then linking version 16.20.2 ensures that version 16.20.2 becomes the active version.

      brew unlink node
      brew link [email protected]

      Credit: Stack Overflow

    • Windows: You can download the Node.js installer directly from the official Node.js website here.

  • Install LoopBack CLI globally:

    npm install -g loopback-cli
  • Install Ember CLI globally:

    npm install -g ember-cli
  • Install PhantomJS globally:

    npm install -g phantomjs phantomjs-rebuilt
  • Navigate to the project directory:

    cd botdistrikt_test
  • Run setup:

    npm run setup
  • Start the backend server:

    npm run dev
  • Navigate to the client directory:

    cd client
  • Serve the frontend:

    ember serve
  • Start the application:

    npm start
  • Open your web browser and navigate to:

Additional Commands

  • To run backend tests:

    • Linux and Mac:

      npm test
    • Windows:

      npm run test:windows

resto_dev's People

Contributors

andregit1 avatar

Watchers

 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.