Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

How to make a "serverless" fusion app with the stripping of node.js? #585

Closed
wheelo opened this issue Oct 23, 2018 · 3 comments
Closed

How to make a "serverless" fusion app with the stripping of node.js? #585

wheelo opened this issue Oct 23, 2018 · 3 comments

Comments

@wheelo
Copy link

wheelo commented Oct 23, 2018

Type of issue

Feature request

Description

I find that the current version of fusion.js is merely made for React SSR app, that I can only access the entry point by some hidden logic under fusion-cli's entry file. As u illustrated in code of L29 it is designed for some FUSION_ENTRY_PATH entry, which is also used by node hot server.
Here, I got one situation that only require the bundled React logic(for some jssdk). Is that possible to integrate the fusion independent of fusion-cli? That is

Current behavior

import App from 'fusion-react';
import Router from 'fusion-plugin-react-router';

const app = new App(root);
app.register(Router);
// I add this line: https://github.com/fusionjs/fusion-cli/blob/master/entries/client-entry.js#L29
app.callback().call();

Expected behavior

 // Could I shorten the calling process to this in my sdk?
 const app = new App(root);
 app.register(Router);
@wheelo wheelo changed the title How to make a "serverless" fusion app with the strip of node.js? How to make a "serverless" fusion app with the stripping of node.js? Oct 23, 2018
@KevinGrandon
Copy link
Contributor

Thank you for filing a bug report. I think this is possible today, but also quite hacky. You can construct a HTML file and pull in the .fusion/ generated scripts manually. I think we would need to do a lot of work to fully support applications without a server, but it could be possible with time.

Curious about your usecase, why don't you want to use a server?

@wheelo
Copy link
Author

wheelo commented Oct 24, 2018

@KevinGrandon Currently, the server api is provided solely by some Java server, and we put the static javascript file and some HTMLs in nginx static server

@mlmorg
Copy link

mlmorg commented May 3, 2019

Going to close this as a duplicate of #484.

@mlmorg mlmorg closed this as completed May 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants