https://github.com/fredlackey/js-spa-example
Example Single Page Application (SPA) Using Only JavaScript
https://github.com/fredlackey/js-spa-example
Last synced: 2 months ago
JSON representation
Example Single Page Application (SPA) Using Only JavaScript
- Host: GitHub
- URL: https://github.com/fredlackey/js-spa-example
- Owner: FredLackey
- License: apache-2.0
- Created: 2018-08-20T23:59:26.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-21T19:23:09.000Z (almost 7 years ago)
- Last Synced: 2025-01-24T10:30:39.679Z (4 months ago)
- Language: JavaScript
- Size: 79.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# js-spa-example
**Example Single Page Application (SPA) Using Only JavaScript**
This project demonstrates the implementation of a single-page application (also known as a "SPA") using pure JavaScript for all front-end functions.---
## Installation & Execution
**Step 1:** Clone the Repository
> `git clone [email protected]:FredLackey/js-spa-example.git`
**Step 2:** Install Dependencies
> `cd js-spa-example.git`
> `npm install`**Step 3:** Compile
The modern JavaScript, within the demo application, must be compiled into a browser-friendly (aka "older") version. We use WebPack to do this. You may run WebPack once, to simply compile it, or you may add the "watch" suffix to keep it running in the background watching for changes to the code:
> `npm run webpack`
... or ...
> `npm run webpack:watch`
**Step4:** Run the Applciation
Now that the JavaScrip is ready for the browser, we launch the development server. Similar to the "Compile" step, above, you may either launch it once, to simply view the app, or you may keep it running throughout development by adding the "watch" suffix to the command:
> `npm run dev`
... or ...
> `npm run dev:watch`
**Note:**
If you will be developing the app, and using the "watch" suffix for the commands above, you must execute each command in a separate terminal instance.**Step 4:** Launch Browser
Once the project is running, launch the browser and navigate to the following URL:
[http://localhost:8080](http://localhost:8080)
---
## Versions
**v0.0.1 :** Initial setup
**v0.0.2 :** Clean up structure, move back end to es6/7, prep api