GithubHelp home page GithubHelp logo

jwpf100 / node-blog-frontend Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.4 MB

Frontend of a blogging app consuming node-blog API. Created with React, bootstrap used for styling. Hosted on AWS using NginX.

Home Page: https://josephfletcher.co.uk/blog/

HTML 29.95% CSS 10.65% JavaScript 59.28% Shell 0.11%
javascript bootstrap aws-ec2 nginx react

node-blog-frontend's Introduction

Blog App - React Frontend

The front end of a blogging app, displaying blogposts using React. Consists of two main pages, the front page displaying summary information for all blogposts, and an individual blogpost page showing the blogpost in full.

Built using React and Bootstrap. Data comes from API located at http://josephlfletcher.co.uk/blog-backend/api/. Eslint and prettier are set up to ensure code meets acceptable standards.

Live version hosted on AWS EC2 Instance, served using NginX at my personal domain josephfletcher.co.uk.

Project Status

This is the MVP. Need to add navbar and footer, and add functionality to sort blogposts by tag, date, and to search.

Project Screen Shot(s)

Example:

Installation and Setup Instructions

Clone down this repository. You will need node and npm installed globally on your machine.

Installation:

npm install

To Start Server:

npm start

To Visit App:

http://localhost:3000/blog

Reflection

This was a project I undertook while learning React. I set out to build a simple blog, that would display articles automatically as they are added, with minimal input when it comes to updating the layout. As such the aim is to allow the user/admin to select the header article, the 4 leading articles, and then the rest will load below.

It dovetails with another main project I'm undertaking (essentialcoaching.co.uk) and the next step will be to add this front end to replace the current blog page on that project, and allow the client to update blogposts as and when they like.

One of the main challenges, or areas that still needs to be addressed is that of security. Allowing the user to display formatted text in the main body means that currently I'm using the dangerouslySetInnerHTML property which can leave the site open to XSS attacks. Although in this situation, there is only a single user accessing the backend, and therefore the risk is low, a next step would be to make that part of the process more secure.

Another challenge was getting the routing correct across the server and the static files as in testing I was hosting the react app at the localhost route, but then in production I switched it to /blog. It won't be a problem next time now I'm clear how it all works, and all the various places I need to update routes, but as a learning exercise it was very valuable.

I chose to use the create-react-app boilerplate to minimize initial setup and invest more time in learning the fundamentals of how react works. In the next iteration I plan on starting from scratch and creating a webpack.config.js file to more fully understand the build process.

node-blog-frontend's People

Contributors

jwpf100 avatar

Watchers

 avatar

node-blog-frontend's Issues

Create Show All BlogPosts FrontEnd

Acceptance Criteria

Front end that takes in array of blog posts. Output shows individual blogpost titles and summary, in tiles, with the relevant image.

Technical

Utilise React for front end. Make call to Node-Blog API route.

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.