This repository was created by Flatlogic Platform.

Overview

DEV.TO

This project was generated by Flatlogic Platform.


We offer 2 ways how to start the project locally: by running Frontend and Backend or with Docker.


To start the project:

Backend:

Please change current folder: cd backend

Install local dependencies:

yarn install

Copy .env file as a new .env.local. Edit database credentials and anything you need in .env.local file. This file is ignored by git, and won't be uploaded anywhere.


Adjust local db:

1. Install postgres:

MacOS:

brew install postgres

> if you don’t have ‘brew‘ please install it (https://brew.sh) and repeat step `brew install postgres`.

Ubuntu:

sudo apt update

sudo apt install postgresql postgresql-contrib

2. Create db and admin user:

Before run and test connection, make sure you have created a database as described in the above configuration. You can use the psql command to create a user and database.

psql postgres --u postgres

Next, type this command for creating a new user with password then give access for creating the database.

postgres-# CREATE ROLE admin WITH LOGIN PASSWORD 'admin_pass';

postgres-# ALTER ROLE admin CREATEDB;

Quit psql then log in again using the new user that previously created.

postgres-# \q

psql postgres -U admin


Additional commands:

Command Description
yarn build Compile typescript files into dist folder
yarn start Run compiled code from dist folder
yarn db:create Create database
yarn db:drop Drop database schema

Usage

Start local development with command below:

yarn dev

To run your code on production server, run several commands:

  • Compile TS code

    yarn build

  • Run compiled code in production mode

    NODE_ENV=production yarn start

Frontend:

Please change current folder: cd frontend

To start the project with Docker:

Description:

The project contains the docker folder and the Dockerfile.

The Dockerfile is used to Deploy the project to Google Cloud.

The docker folder contains a couple of helper scripts:

  • docker-compose.yml (all our services: web, backend, db are described here)

  • start-backend.sh (starts backend, but only after the database)

  • wait-for-it.sh (imported from https://github.com/vishnubob/wait-for-it)

    To avoid breaking the application, we recommend you don't edit the following files: everything that includes the docker folder and Dokerfile.

Run services:

  1. Install docker compose (https://docs.docker.com/compose/install/)

  2. Move to docker folder. All next steps should be done from this folder.

    cd docker

  3. Make executables from wait-for-it.sh and start-backend.sh:

    chmod +x start-backend.sh && chmod +x wait-for-it.sh

  4. Download dependend projects for services.

  5. Review the docker-compose.yml file. Make sure that all services have Dockerfiles. Only db service doesn't require a Dockerfile.

  6. Make sure you have needed ports (see them in ports) available on your local machine.

  7. Start services:

    7.1. With an empty database rm -rf data && docker-compose up

    7.2. With a stored (from previus runs) database data docker-compose up

  8. Check http://localhost:3000

  9. Stop services:

    9.1. Just press Ctr+C

Most common errors:

  1. connection refused

    There could be many reasons, but the most common are:

  • The port is not open on the destination machine.

  • The port is open on the destination machine, but its backlog of pending connections is full.

  • A firewall between the client and server is blocking access (also check local firewalls).

After checking for firewalls and that the port is open, use telnet to connect to the IP/port to test connectivity. This removes any potential issues from your application.

MacOS:

If you suspect that your SSH service might be down, you can run this command to find out:

sudo service ssh status

If the command line returns a status of down, then you’ve likely found the reason behind your connectivity error.

Ubuntu:

Sometimes a connection refused error can also indicate that there is an IP address conflict on your network. You can search for possible IP conflicts by running:

arp-scan -I eth0 -l | grep

arp-scan -I eth0 -l | grep

and

arping

  1. yarn db:create creates database with the assembled tables (on MacOS with Postgres database)

    The workaround - put the next commands to your Postgres database terminal:

    DROP SCHEMA public CASCADE;

    CREATE SCHEMA public;

    GRANT ALL ON SCHEMA public TO postgres;

    GRANT ALL ON SCHEMA public TO public;

    Afterwards, continue to start your project in the backend directory by running:

    yarn start

You might also like...
This project was created to help represent a fundamental app written with Vue.

Simple Vue App This project was created to help represent a fundamental app written with Vue. The heroes and villains theme is used throughout the app

Giraffe is a 📰 Free news, blogs or magazines application theme, built with Vuetify created by HeroUI.
Giraffe is a 📰 Free news, blogs or magazines application theme, built with Vuetify created by HeroUI.

Giraffe is a complete application theme, Giraffe theme built with Vuetify created by HeroUI. It is a solution that displays dense content, such as news, blogs or magazines, including news, authors, classified pages, and so on.

PrestaShop integration with Vue Storefront created by Binshops.
PrestaShop integration with Vue Storefront created by Binshops.

Vue Storefront 2 eCommerce integration with PrestaShop This repository is a PrestaShop integration for Vue Storefront 2. Beta version. Installation in

Web Application created in vue

Rick And Morty App Application web created in Vue 2 with the rest service Rick And Morty API Demo https://testrickandmorty.netlify.app/#/ Steps to run

Busses App frontend created on Vue + Vuex + Boostrap
Busses App frontend created on Vue + Vuex + Boostrap

OVERIDE - Proyecto app gestion viajes Acerca de la app Overide es una applicacion creada con el fin de poder gestionar la compra de pasajes de buses i

Simple hotel reservation app created with Vue.js and BootstrapVue.

Hotel Reservation 💣 💥 Project Link Simple hotel reservation app created with Vue.js and BootstrapVue. You can select a hotel from a list and make a

Created for hospital robot management during COVID-19 with Laravel and vuejs

Description This project contains with Laravel and vuejs This task was created for hospital robot management during COVID-19. Installation Given below

StartApp Familie is a Tech4Germany project, created in cooperation with the BMFSFJ, for a todo list that helps improve the partnership of couples.
StartApp Familie is a Tech4Germany project, created in cooperation with the BMFSFJ, for a todo list that helps improve the partnership of couples.

StartApp Familie is a Tech4Germany project, created in cooperation with the BMFSFJ, for a todo list that helps improve the partnership of couples.

Stock value wathing app created with Vue.js and Vuetify

Stock Patrol 💣 💥 Project Link Stock value wathing app created with Vue.js and Vuetify. You can search for a company logo and display the stock value

Owner
Eugene Stepnov
Doing things at Flatlogic.com
Eugene Stepnov
A repository to quickly build apps for any platform using web technology

A repository to quickly build apps for any platform using web technology

wellá 2 Apr 8, 2022
A picture book creation platform created by Vue2.X+Flask+MySQL

A picture book creation platform created by Vue2.X+Flask+MySQL

QinShiwen 2 Jun 7, 2022
Icpscan is a Block Explorer and Analytics Platform for Dfinity, ICP is a global computing platform.

Icpscan is a Block Explorer and Analytics Platform for Dfinity Project includes: Transactions (Search) Project (Project) Rank (ICP Holder Address Rank

NnsDAO Labs 20 Jul 16, 2022
This repository is for Leam technical Test .

cookbook Build Setup # install dependencies $ yarn install # serve with hot reload at localhost:3000 $ yarn dev # build for production and launch se

null 0 Dec 27, 2021
Repository for practice vue.js

vue-practice Project setup npm install Compiles and hot-reloads for development npm run serve Compiles and minifies for production npm run build Li

GyoHeon Lee 0 Dec 29, 2021
Github Repository List Built With Vue.js

Github Repository List This build utilizes GitHub's API to grab a list of repositories, and then from there a list of commits from each of the reposit

Katrinka Joy Swenson 1 Jul 16, 2022
GohanGo!! NFT Official Repository

This is the public repo for the GohanGo!! NFT project, this is not a complex app but we decided to open source this in support to those who are/planning to launch an NFT project. Hope this would provide helps you guys in any sort of way. ??

逗比国国王DbgKing 4 Jun 14, 2022
Nuxtjs With Repository-pattern + Atomic design + Vee-validate

Nuxtjs With Repository-pattern + Atomic design + Vee-validate Getting started My great project.

null 3 Jun 7, 2022
This repository serves as the frontend for the Torrust Index project.

Torrust Index Frontend This repository serves as the frontend for the Torrust Index project. Documentation You can read the documentation here. Instal

Torrust 6 Sep 16, 2022
The official repository for Vue.js Forge Episode 2

Vue.js Forge Episode 2 Codebase This repo includes: The boilerplate code for the event (branch: main) Branches for both the starting point and the end

VueSchool.io 70 Sep 15, 2022