Example of Svelte application with WordPress REST API
Svelte Svelte with WordPress API of a Single Page Application which built over Svelte, Bootstrap using Wordpress Rest API. This code can Be used as boilerplate for Svelte Application Development and as ready use Web development.
git clone https://github.com/ganesank/wp-svelte
git checkout branchname
npm install
or yarn install
if you use Yarnnpm run dev
or yarn dev
to start a local development serverhttp://localhost:5000
or - A new tab will be opened in your browserYou can also run additional npm tasks such as
npm run build
to build your app for productionnpm run lint
to run linting.You must have Node.js and npm installed on your machine. This project was built against the following versions:
SPA based on Counter Component Developemnt
reactive declarations with variables which automatically computes the changes
executes statements reactively when a value changes
feasibility of multiple logic and conditional statements
No Virtual DOM
Significantly less boilerplate and better performance
Options to utilize the data using props, Contexts, Stores & Module Scope
Lifecycle functions to performe before and after mount, after update and on destroy
CRUD operation with WordPress REST API
Accessing public and private routes
Handing WordPress REST API custom end points
Pagination for blog and other post types
Authentication with JWT ( Login Logout )
User Login and Managment
Add your wordPress siteUrl in src/client-config.js
const clientConfig = {
siteUrl: 'http://localhost:8888/wordpress'
};
export default clientConfig;
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.