DEPRECATION NOTICE
This Project has been replaced with our new CLI tool for spinning up projects,
create-chayns-app
, and will not receive updates going forward.For a more in-depth guide to start developing content for chayns, visit the
create-chayns-app
repository.
A starter template for developing chayns® Pages with React.
npm install
npm run dev
to start a dev server onhttp://localhost:1234/
npm run build
to create a production bundle
You should also replace the values with your own:
name
-field inpackage.json
- Content of
<title>
insrc/index.html
-
Git
You must have Git installed on your system. If you do not already have it, get it here. You do not need to know much about git to start with this template.
-
Node.js >=12.10
You must also have Node.js version 12.10 or greater installed. If you do not already have it, get it here.
On windows this can be done with Shift + Right-Click
in the explorer and
Open PowerShell here
. On macOS, right-click the parent folder and choose
Open Terminal here
.
You should have Git installed by now, so in the newly opened window just run
git clone https://github.com/TobitSoftware/chayns-react-template.git my-project
.
You can replace my-project
in the command with the name of your project.
After a short process the project files can be found in the my-project
folder
(or whatever you named it).
If you do not already have a code editor, Visual Studio Code is a good one.
You can open a folder in Visual Studio Code via File > Open Folder...
in the
top menu.
Run npm install
in the project directory. In Visual Studio Code, you can get a
terminal in the current folder via Terminal > New Terminal
in the top menu.
To start developing your custom page, run the npm run dev
command. Add a page
with the URL http://localhost:1234/
to your chayns-Site. You will see your
page running there.
Be aware that this is only a local version of your page, so no other devices can access your development server.