Giter Club home page Giter Club logo

fullstacktemplate's Introduction

Creating a Full Stack Web Application with Python, NPM, Webpack and React

This project shows you how to build a basic web application using popular web technologies like NPM, Webpack, React and Python.

Let's Build It Together!

You can find a walkthrough of how to build this application from scratch on my blog.

Installing and Running

After cloning this repository to your computer, you need to perform the following steps to be able to run it:

  1. Ensure you have npm, python and pip installed on your machine.
  2. Go to the fullstack_template/static directory and execute "npm install". This will download and install the dependencies listed in package.json.
  3. In the static directory, start the npm watcher to build the front end code. "npm run watch".
  4. Create a python virtualenv.
  5. Install flask (pip install flask).
  6. Start the server. Go to the server directory and do "python server.py".

Jumping to Different Completion Points

You can use the git tags to jump to different completion points in the code.

Basic Setup

If you go to the BASIC_E2E_TEMPLATE tag, you will find the application as it will be when you've followed the first blog post to the end. You will have a basic web application with a Python backend and a React front-end, but they won't be passing any data between each other yet.

A Simple Website

If you go to the SIMPLE_WEBSITE tag, you get a simple website with a button requesting info from python and displaying the result. It has a nice design, as a background image and CSS support has been added.

When you click the button, 'Hello' will be displayed in a random European language.

This is what it looks like: Simple Website

fullstacktemplate's People

Contributors

angineering avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fullstacktemplate's Issues

GET /hello not found

not found error

I have everything apart from the css and the css-loader. I have a live-server running on the terminal and every time I click the button, in the terminal it states "GET /hello 404". Is there a solution to this?

webpack does not reflect changes

Hi @angineering,

Whenever I make a change in static files,
I see on terminal that webpack is building new changes
But the when I load the webpage, I can't see any changes reflected.
Could you please provide assistance about how to fix this?

As you can see it is now "Alihan":
image

And I can see that webpack rebuilt it:
image

But unfortunately it is still shows "Rimini" String:
image

Great contribution to hobbyist developers btw, Thank you, Thank you and Thank you!
Cheers,

"npm run install" fails

I'm trying to follow your tutorial but I got stuck midway when you add the App.jsx... so I decided to clone you repo instead but I quickly run into a problem:

$ npm run install

produces the following output for me:

lucas-mbp:static luca$ npm run install
npm ERR! missing script: install

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/luca/.npm/_logs/2017-09-10T20_33_01_743Z-debug.log

What am I doing wrong?

webpage is not loading

I cloned the "simple website" repository and followed all the steps as mentioned in README. But, the website is not loading.

npm run watch - runs till 64 % and the last message is this

64% building modules 453/454 modules 1 active ...ack_template/static/css/fullstack.css(node:11878) DeprecationWarning: Chunk.modules is deprecated. Use Chunk.getNumberOfModules/mapModules/forEachModule/containsModule instead.
Hash: 9067f5fc162232cd71f4
Version: webpack 3.9.1
Time: 4004ms
Asset Size Chunks Chunk Names
1776662db43bd611e4eb11d2add6d1c6.jpg 1.24 MB [emitted] [big]
bundle.js 4.66 MB 0 [emitted] [big] main
styles.css 522 bytes 0 [emitted] main
[205] ./js/index.jsx 470 bytes {0} [built]
[305] ./js/App.jsx 3.02 kB {0} [built]
[306] ./js/Hello.jsx 4.23 kB {0} [built]
[447] ./images/header.jpg 82 bytes {0} [built]
[448] ./css/fullstack.css 41 bytes {0} [built]
[449] ./node_modules/css-loader!./css/fullstack.css 714 bytes [built]

  • 447 hidden modules
    Child extract-text-webpack-plugin:
    1 asset
    [0] ./node_modules/css-loader!./css/fullstack.css 714 bytes {0} [built]
    [2] ./images/header.jpg 82 bytes {0} [built]
  • 1 hidden module

After running python server.py, the local host page is blank nothing is loaded.

Am I missing something?

Pathing Error

I get this related to pathing so I know my package.json is in the static folder but I dont understand how to change npm to new pathing.

(vessel_env) PS D:\Openvessel\vessel-app> npm run watch
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path D:\Openvessel\vessel-app\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'D:\Openvessel\vessel-app\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\lesli\AppData\Roaming\npm-cache_logs\2020-06-04T18_47_18_813Z-debug.log

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.