-
Notifications
You must be signed in to change notification settings - Fork 0
Quick Start
Follow these 2 simple steps to get your first FireJS site spinning.
install using yarn or npm
yarn
$ yarn add @eadded/firejs react react-domnpm
$ npm install @eadded/firejs react react-domMake dir src/pages in the project root. This dir will contain all the pages required for our brand-new hello world website.
Make a file 404.js in the dir. This file will be the 404 page of our website.
export default () => {
return (
<div>
<p>Welcome to 404</p>
</div>
)
}Add the following script(s) to package.json
"scripts": {
"dev": "firejs",
}Now run using yarn or npm
yarn
$ yarn run devnpm
$ npm run devNavigate to http://localhost:5000 and there it says Welcome to 404.
To change server PORT set env variable PORT to the required value
But why 404 page?
You don't want anyone visiting your site to face a blank scary unknown page when they type in a wrong URL. So we made it mandatory to add a 404 page. Whenever you make a routing mistake FireJS will fallback to the 404 page.
Star us on github or checkout our npmjs page.
🏡 Home
Getting Started
-
⚛️ Components
Advance
🗒️ All examples in this documentation are written in typescript