Hosting simple NPM local server on GitHub gh-pages?

Bao Pham

Is it possible to currently host local served content to gh-pages that isn't a framework?

Just simple html, css, and JS files along with API calls.

Currently using a npm package http-server for a simple server.

  • I attempted using npm gh-pages, however because I am not using a framework, I don't have a build option. Even using the default npm run-script build does not exist. Even so, I read that build is required for C/C++ bindings that causes a requirement for a build process.
Peter Olson

gh-pages only serves static content, it doesn't allow server-side hosting.

This is no problem:

simple html, css, and JS files

but this

along with API calls.

is not possible unless you do everything through requests to external servers.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

gh-pages -d build has failed when using npm run deploy for Github Pages

How to add a new local branch to track the remote branch created by GitHub pages (gh-pages)?

Github Pages: This branch is even with gh-pages

GitHub Pages: the structure of `gh-pages` branch

How to deploy npm project to gh-pages

github site from gh-pages branch

Change GitHub profile link on GH Pages

Git not pushing correctly for Github gh-pages

Github Pages as Static Image Hosting

Understanding Jekyll and the gh-pages branch when using GitHub Pages

Hosting React project on Github pages while developing

hosting a processing.js project on github pages?

Hosting a Facebook Messenger bot in github pages

How to create a simple hosting server?

R blogdown : deploy with github actions on gh-pages

gh-pages across Github projects all link to domain

A problem with publishing a react app to github with gh-pages

How to host a React App on Github gh-pages

Writing to server with github pages

simple iframe is not displayed on github pages

Create github pages on github, but local is up to date?

GitHub Pages publishing from master vs master/docs or gh-pages branch

When pushing a React app to GitHub pages, is it required that the default remote branch be `gh-pages`?

Does GitHub Pages allow to use a branch other than master or gh-pages?

GitHub Pages deployment error: "You have to provide a GITHUB_TOKEN or GH_PAT"

Website in web hosting service and DB in local server

Hosting Font-Awesome file on local server

Error 405 - Not Allowed | Wordpress website hosted on github pages with Xampp server on Local Machine

A simple local SMTP server