-
Notifications
You must be signed in to change notification settings - Fork 3
Basic Environment Setup
tmpmachine edited this page Oct 15, 2022
·
4 revisions
// install nodeJS & NPM
sudo apt-get update
sudo apt install nodejs
sudo apt install npm
// install repository packages, execute inside codetmp folder
npm install
// install firebase CLI
sudo npm install -g firebase-tools
Open codetmp/index.html
.
Codetmp will preview your code in cpreview.web.app
by default. To target preview site to local environment, setup a local server for codetmp/cpreview
, then change previewUrl
in codetmp/js/components/preview.js
to your desired host.
node build
A folder named deploy
will be created along with the build files.
// first login to your firebase account
firebase login
- You may need to upgrade nodejs version supported by the lastest firebase tools.
- You may need to install required repository to install the latest version of nodejs.
firebase deploy --only hosting:codetmp
Replace codetmp
with the target hosting name.
You may want to change the target folder to be uploaded to firebase hosting by changing below value in firebase.json
.
{
...
"target": "codetmp",
"public": "codetmp", // change to deploy/codetmp to deploy the build files instead of development one
...
}