Giter Club home page Giter Club logo

decorasaurus-server's Introduction

Decorasaurus Server

Todos

  • Make typescript server
  • Finish up gzip / cache settings
  • Upload node server and test prod works
    • Need to setup env vars and probably imagemagick
  • Turn on colorspace conversion
  • Create dev / prod env with Moltin and S3 with decorasaurus email
  • Fusion / Floyd integration
    • Get curl statement in child spawn working
    • Finish flow
    • Add login check
    • Failing out of memory with 2mb photo on postman, but works with 600kb photo. Maybe cap at 1mb?
    • Node request not working...
    • Curl does work usually from terminal. This whole thing is a bit finicky though... Might have to do manually for a bit until I can get it sorted...
    • Running sendToFloyd fn on its own will work for a image fine (worked with 600kb img), but not when queued up with other commands for some reason (usually).
  • Cloudflare integration
  • Setup postmark email

Dev

To develop, we run:

npm run watch-ts

and in a separate terminal we run:

npm run watch-node

Explore API

Use http://localhost:5000/api/graphiql to enter the graphiql editor

Floyd Work

  • Guide https://docs.floydhub.com/examples/style_transfer/
  • For the front end we can use JS to mock it quickly while we use floyd for when user actually orders - check
  • Batch new fusion orders and process once a day in the night probably
  • Turn on server programatically and then off when finished processing - check
  • Will need to see if we can send a bunch of images at a time to flask server or just one. In any case create an image in Node and send over to our endpoint.
    • Process the image first probably degrading it a bit if too high res? Make the correct size too based on their order. Need to test this.
  • Recieve image(s) back from flask and make into a pdf with that processing and patch the order with the S3 url for the custom pdf url field
  • Performance
    • Input file 4.9 mb 4032 × 3024
    • Output 3.2 mb 4032 × 3024
    • Time spent 50 seconds @ $1.20 / h = $.72

Digital Ocean Login

$ ssh [email protected]

Digital Ocean Setup

  1. Create new project with DO
  2. Either create a new SSH key or use existing on account
  3. Sign in to account by copying ip address and login to root at $ ssh root@<ip_address>
  4. Setup user and ssh access and firewall https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-18-04
  5. Setup domain hostnames + email
  6. Install nginx / server blocks
  7. Setup SSL
  8. Setup HTTP2
  9. Setup gzip and browser cache
  10. Setup SFTP Cyberduck
    • Go to bookmarks tab and on bottom right add new
    • Make sure its SFTP connection and add relevant server ip address, username, and ssh key
  11. Setup Node App and PM2
  12. Updating Node Application
    • POMB has it in /home/bclynch (for whatever reason)
  13. Updating Front End Application
    • Create produciton dist folder with $ ng build --prod
    • Dump generated dist folder in root /var/www/decorasaurus.com/frontend/dist

ENV Variables

decorasaurus-server's People

Contributors

bclynch avatar

Watchers

James Cloos avatar  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.