Coder Social home page Coder Social logo

Comments (13)

MitchWilkins avatar MitchWilkins commented on July 29, 2024

I think it is important to have a clear vision. What does this accomplish? What are the key components? How do people work on them? That could be added or could replace the README page.

I think the Slack channel is good and the communication through the issues tab is effective.

There is a projects tab next to the pull requests tab that we could use to organize tasks/stories. There are also things like trello to help with that too.

from pair-frontend.

ThomasBullock avatar ThomasBullock commented on July 29, 2024

Gulp js is really good for this. https://scotch.io/tutorials/automate-your-tasks-easily-with-gulp-js Are you open to setting this up with the Sass version of Bootstrap? It's modular so would help with collaboration plus makes it easy it remove bootstrap features you don't need.

from pair-frontend.

JacksonBates avatar JacksonBates commented on July 29, 2024

Thanks @ThomasBullock.

Pardon my ignorance - but the create-react-app tool this was built with uses webpack in it's build process. Do you think that will cause issues, or do they play nicely together?

from pair-frontend.

ThomasBullock avatar ThomasBullock commented on July 29, 2024

Don't worry about ignorance - I'd never heard of webpack :) Looking into it though it appears they do play together. http://stackoverflow.com/questions/33558396/gulp-webpack-or-just-webpack . Whether you need gulp remains to be seen however as maybe webpack can do it all and save you adding yet another FE technology. I don't know enough about webpack. Is it handling your css or just the js?

from pair-frontend.

hristijankiko avatar hristijankiko commented on July 29, 2024

Why would you use two build tools? gulp and webpack. I think one is good enough, and webpack is the perferred one for working with React. Or is there a feature that gulp has and webpack doesn't that I'm not aware of?

from pair-frontend.

JacksonBates avatar JacksonBates commented on July 29, 2024

If you run npm install in your forked repo, you'll be able to see the node_modules etc.

The webpack config is in node_modules/react-scripts/config:
image

Theres one for dev and for prod - so we should take a look through those carefully to determine what's going on and what we need to do.

from pair-frontend.

JacksonBates avatar JacksonBates commented on July 29, 2024

Ok, I've been thinking about this...looking for feedback / ideas:

We want to ensure that when a contributor runs this on localhost using npm start, that it communicates with a dev version of the backend as well - which means the backend repo should also be running with npm start and mongod should be running.

Then it should GET, POST, and DELETE to and from the dev backend. This likely means that dev frontend and dev backend shouldn't both choose port 3000...

Running npm build should create a deployable version that communicates with the production backend.

Does that sound like I'm on the right track?

from pair-frontend.

planigan avatar planigan commented on July 29, 2024

That's the right track, yes. Of note, though, the magic that create-react-app is doing, I start the backend locally and then start the front end, it finds the conflicting ports and asks to use another, choosing 3001. This is not ideal and should be fixed, but I thought it was pretty nifty that it did that.

from pair-frontend.

JacksonBates avatar JacksonBates commented on July 29, 2024

@planigan that is pretty cool - I hadn't tried running them concurrently yet, but that will serve as a workaround until we change one of the ports. Once I've merged the current backend PR I'll have the cognitive space to think this one through to its conclusion :)

from pair-frontend.

jenovs avatar jenovs commented on July 29, 2024

I think there should be two options for contributors - full setup with db etc. and light setup with some hardcoded mock data for people who just want to fix some CSS. Default of course should be light one.

One option I think could be creating config file with something like this:

let serverUrl = 'real_server_url'; // ??? Not sure if this should be hardcoded here
if (process.env.NODE_ENV === 'development') {
  serverUrl = '/path/to/file/with/hardcoded/data/'
  // serverUrl = 'http://localhost:3456'  <-- uncomment for use with real server on port 3456
}

module.exports = serverUrl;

Then in App.js and Campers.js require this config file and replace http://this.is.heroku.server with required variable:

fetch(`${serverUrl}/api/v1/posts`)

Just thoughts.

from pair-frontend.

planigan avatar planigan commented on July 29, 2024

Could also do something like:

let serverUrl = 'real_server_url'; // ??? Not sure if this should be hardcoded here
if (process.env.NODE_ENV === 'development') {
  serverUrl = process.env.MONGODB_URI || '/path/to/file/with/hardcoded/data/'
}

module.exports = serverUrl;

Then use dotenv and an .env file for configuration.

from pair-frontend.

jenovs avatar jenovs commented on July 29, 2024

So I implemented my suggestion in code and made a PR.
Seems to work.

from pair-frontend.

JacksonBates avatar JacksonBates commented on July 29, 2024

Cool - I'll check tomorrow. I'm working on the delete button at the moment :)

from pair-frontend.

Related Issues (20)

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.