Giter VIP home page Giter VIP logo

fed-at-ibm's Introduction

FED@IBM Website

https://fed-at-ibm.mybluemix.net is the public home for IBM’s front-end development community.

This project uses React.js/Next.js for the front-end and Node.js/Express.js for a server.

Content Editing

Most content can be edited from https://app.contentful.com in the IBM organization, within the FED@IBM space. The latest drafts of content can be previewed at https://fed-at-ibm-staging.mybluemix.net before being published.

Development

Setup

  1. Install Node.js
  2. Command line: git clone [email protected]:ibm-frontend/fed-at-ibm.git && cd fed-at-ibm && npm install
  3. Reach out to James Rauhut, Kelly Churchill, or Scott Strubberg for a .keys.js file to include in the root of fed-at-ibm. This includes all of the API keys for Contentful content.
  4. Set up secure https for dev mode:
    1. From a finder window open fed-at-ibm/certs/localhost.cer with Keychain Access
    2. In Keychain Access, select Certificates in the left sidebar
    3. Right click localhost and select Get Info
    4. In the Get Info window, expand the Trust panel
    5. For When using this certificate select Always Trust

Run dev mode

Command line: npm start

View at https://localhost:3000. Remember, that you have to use https for a secure connection.

Firefox

Firefox will fail to load after an npm start and throw an error referencing an improperly configured site. This has to do with the signing of the certificate used and can be safely ignored.

Folder structure

Please refer to Next.js before getting started on this project. Next.js provides server-side rendering and performant code splitting in a minimalistic way. This allows you to focus on the actual React UI code. To change the HTML document for all pages, edit fed-at-ibm/pages/_document.js. To edit the React shell for all of the pages (like where you would include a nav bar), edit fed-at-ibm/pages/_app.js.

All React components that you want to appear as a normal page with a route should be in fed-at-ibm/pages/.

All other React components can be placed in fed-at-ibm/components/.

All server-side code is done in Node with Express.js and is located in fed-at-ibm/server/.

Styling

This project uses Styled Components. Styled Components automatically scopes styles for less mistakes, can be conditional based on props passed down, and provides only the expected styles per a page with Next.js code splitting.

Static files

To add static files, like an image, place the file in static/. When referencing the file, prefix the path with /static/. Example:

div {
  background-image: url("/static/yourImage.jpg");
}

Deploy

All deployments require the following:

When updating an existing app, we have scripts keep the old app up until the new app is done deploying. You will almost always only use the "update" scripts below. The "deploy" scripts below the "update" scripts will provide unnecessary downtime. Each deployment process will request your w3 IBM Cloud login. This should be your w3 credentials.

  • Update Staging: npm run deploy
  • Update Production: npm run deploy:prod

Staging Link: https://fed-at-ibm-staging.mybluemix.net

Production Link: https://fed-at-ibm.mybluemix.net

fed-at-ibm's People

Contributors

kellychurchill avatar seejamescode avatar

Watchers

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