Giter VIP home page Giter VIP logo

g's Introduction

Instalation

Overview

The app can be booted locally using Docker, which creates a database containing dummy data and runs the backend node.js app.

It also creates a separate container in which you can run the development vue-cli server using npm run dev.

The backend code is fetched via github, and in order to fetch new commits, you will have to rebuild the backend service without using the docker cache.

A quick workaround for this is changing the value of the CACHEBUST argument in .devcontainer/backend.Dockerfile.

For example

    - ARG CACHEBUST=1
    + ARG CACHEBUST=2

will force docker to make a new request to the github server.

After making this change, you can rebuild the containers normally.

Regarding CORS errors: always access the frontend via http://localhost:8080. Any other URL will result in CORS errors, as the backend container only sets the header for that specific url.

Using VS Code's devcontainer

If you use vscode, you can easilly set up the project using the Remote - Containers extension.

  1. Install the extension via VS Code > extensions or this link
  2. Go to View > Command Palette... and select option >Remote-Containers: Reopen in Container.
  3. Open the terminal and run npm install and then npm run dev.
  4. Access http://localhost:8080 and verify that the app is running.

The devcontainer will include a few VS Code extensions which you can edit by changing the extensions property in .devcontainer/devcontainer.json.

Using Docker

If you are using Docker there are a few extra steps which I've bundled in the docker-start.sh script.

Please inspect the script for further information, and run it using

./docker-start.sh

Styling (scss)

This project uses sass and compiles it with gulp.

You can edit the files in src/assets/sass and generate the css files with npm run sass.

Building for deployment

The files can be built for deployment by running

            npm run build

Make sure to switch the projectURL and backendURL global variables found in src/main.js to the production URLs.

            Vue.prototype.$projectURL = 'https://gchan.com.br/';
            Vue.prototype.$backendURL = 'https://gchan-backend.com.br';

The docker-start.sh script has a helper function, ./docker-start -b which automatically switches the URLs and builds the files into the ./dist directory.

After building, you can deploy the files to any http server, for example, with node's http-server package:

    cd /dist && npx http-server .

g's People

Contributors

guites avatar guits-garcia avatar gustavo-marini avatar gustavomarmentini avatar

Stargazers

 avatar

Watchers

 avatar

g's Issues

opting out of typing an URL for image on the reply form sets triggers the preview if the image is still there

the on blur event will trigger regardless of which element you click when focusing out of the input.

user then has to visualize the preview in order to cancel it, or else it gets stuck in a loop of clicking cancel -> opening preview modal -> confirming the preview, clicking cancel...

this is tied to the previewFromUrl method, around line 239

there must be a way to check which element in being focused into?

Box height glitch

Limiting post/reply box size by content allows for some snarky hacks like
Screenshot_20220401-180611_DuckDuckGo
Instead,

  • limit box height and add scroll based on element height

preview of uploaded videos will fail to load

it seems like imgur takes a while to process the video.
grabbing the url just after upload will result in a blank page. after a few seconds, the video plays ok.
submiting a video with a broken preview will also attach the video correctly to the post.

this tends to happen more often with longer/heavier videos.

maybe we should set a timeout on a succesful upload and try reattaching the src a few times?

Screen Shot 2021-12-03 at 00 45 07

Problema ao reabrir caixa de resposta

ao clicar para fechar uma citação de resposta e clicar de novo pra abrir, ele não realiza esta última ação.

espero que ajustem, o site é muito bom, parabéins!

Images with .jpg extension cannot be uploaded

App will error out with imgur default "extension not allowed"

Example: Some images with .jpg extension will error out with

Aceitamos apenas imagens no formato JPEG, PNG, GIF, APNG e TIFF!

Sometimes, renaming to .jpeg will fix the problem. Sometimes, sending the image again will fix the problem.

using imagemagick with:

convert image.jpg image.jpeg

seems to work.

Maybe this should be dealt with on the server side?

Include a deployment method

The new devcontainer/docker configuration must include some script or way to deploy changes to github pages.

6. Create a bash script that will load the necessary env vars and docker-compose up/down, delete created containers/images, for non vs-code users [ ]

Glitches on the new search bar

Some fixes needed for the new search bar:

  1. When typing the first few characters, loads of posts are loaded into the page, this can crash cellphones. Add some pagination (25 at a time?) with a buttom to render more results.
  2. Add a divider between results as sometimes its confusing to understand which image belongs to each post
  3. Hitting enter submits the form, also pressing the search button on cellphone keyboard
  4. loader gets distorted on /post pages
  5. dates are not properly formated
  6. clear search results by pressing esc

automaticamente

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.