Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    James Lee
    @uptownhr
    i'm trying to keep a balance of opinions,functions and simplicity
    really hard
    haha
    Niall O'Brien
    @niallobrien
    For sure
    Let me take a look at the code ;)
    James Lee
    @uptownhr
    hehe
    Niall O'Brien
    @niallobrien
    Okay, I like that you’re using proper file names, and not like /post/index.js
    Makes using CMD+P much easier
    James Lee
    @uptownhr
    whats CMD+P?
    Niall O'Brien
    @niallobrien
    Sublime Text (I have it mapped in Webstorm)
    James Lee
    @uptownhr
    btw, i'm actually doing both
    is it to open files?
    Niall O'Brien
    @niallobrien
    yeah, very quickly
    James Lee
    @uptownhr
    i use webstorm too, but i have different keybindings
    but going back to index.js
    i have controllers/index and models/index
    if you want to include in all the files of that dir
    its very useful for destructuring
    now you can do, { User, Project } = require('./models')
    Niall O'Brien
    @niallobrien
    For sure, but makes file hopping a bitch
    James Lee
    @uptownhr
    instead of having multiple lines
    Niall O'Brien
    @niallobrien
    Having 5 index.js files open is not fun
    Man, that Post controller looks damn clean
    No validation in there?
    James Lee
    @uptownhr
    it's just a view
    so no input
    Niall O'Brien
    @niallobrien
    Ah, looking elsewhere :)
    You have a Gitter?
    Instead of polluting this one
    James Lee
    @uptownhr
    yup
    hehe
    uptowhr/hackable
    Niall O'Brien
    @niallobrien
    Any advice for structuring large apps with Hackathon Starter? Thanks.
    Anker
    @ankerbachryhl
    Hi, @sahat Awesome project :smile: :+1: What would you recommend, if I wanna add a chat? :smile:
    tackpapa
    @tackpapa
    is there any way i can replace jade with angular?
    Sahat Yalkabov
    @sahat
    @ankerbachryhl Thanks. There are probably existing chat solutions, but you can also implement it yourself using socket.io.
    Dipesh Bhardwaj
    @Dev-Dipesh
    @tackpapa Jade, which is now Pug is a templating engine. You can use Angular within Jade
    rakesh kumar jha
    @rakeshk706_twitter
    hi
    can anyone please help me with the linkedin login
    Tobias Lundgren
    @lundgren2
    Would you recommend to install React on this starter kit?
    agaez code
    @agaezcode
    It is possible to read images in a folder (upload folder) with fs and make them available in front-end?
    agaez code
    @agaezcode
    I mean, what process/flow are you guys using to work with files uploaded to the server? Are you saving a reference of the images to the database or are you using file system to present them to the client side? I'm stuck
    Sahat Yalkabov
    @sahat

    @agaezcode Yes, Express makes it easy for you to do that. If you really want to share the entire uploads folder with everyone, then you can make it an express.static directory in app.js, just like public directory. By default, if I remember all files are uploaded as random hashes without file extensions, so it's up to you to add file extension when you save a file to /uploads. And yes typically you would save a reference (unique filename) to your database and then upload this file to S3.

    You can then get that file from S3 via URL:
    https://s3.amazonaws.com/YOUR_BUCKET_NAME/YOUR_FILENAME

    The reason why you don't keep all your uploads inside /uploads folder permanently is because those files will all be wiped on your next code push.
    If images are really small and you have plenty of database space, you can store images as Base64 strings in MongoDB/SQL database as well.
    @lundgren2 It's up to you. I think you would be better off with a dedicated React boilerplate by Max Stoiber. https://github.com/mxstbr/react-boilerplate
    @ankerbachryhl Thank you. Go with Socket.io! There are a lot of tutorials that show you how to build a chatroom from scratch using web sockets and socket.io
    Sahat Yalkabov
    @sahat
    @niallobrien For structuring large apps, a lot of these front-end principles still apply to structuring Node.js apps on the back-end: https://vimeo.com/168648012
    @uptownhr @niallobrien I recently worked on a project where all components were organized "by feature" and each component's JS file was named index.js. Sure it makes "require/import" really clean, but oh wow what a pain it was to switch between these files inside IDE when all files are named index.js.
    agaez code
    @agaezcode
    @sahat I recently post this question on stackoverflow on how to save reference of multiple images to database. Can you explain/understand what I am doing wrong on that code? Thank you