@qubejs/web-react
TypeScript icon, indicating that this package has built-in type declarations

0.5.0-beta.33 • Public • Published

@qubejs/web-react

Core framework for web, plugin, cms & nodejs server

npm npm

Demos

Issues Report

https://github.com/qubejs/qubejs

Download and Install qubejs

Install from npm

npm install @qubejs/web-react

Available Modules

At present, we officially aim to support 4 modules

  • @qubejs/ui-material-base
  • @qubejs/web-react
  • @qubejs/cms
  • @qubejs/core

CMS Server

import express from 'express';
import * as path from 'path';
import { ContentServer } from '@qubejs/cms';
import siteConfig from '../site.config';
import config from '../config/environment';
import appConfig from '../config/app-config';

const app = express();
app.use('/assets', express.static(path.join(__dirname, 'assets')));

const cmsSever = new ContentServer(
  {
    contentPath: path.resolve('./apps/server/content'),
    serverPath: '/content/*',
    rootApp: path.resolve('./apps/server'),
    internalDevPath: path.resolve('./libs/cms'),
    damAssets: path.resolve('./apps/server/dam'),
    clientLibs: path.resolve('./apps/server/clientlibs'),
    userData: () => {
      return {
        tenantCode: process.env.TENANT_CODE || 'NOT_DEFINED',
        sitekey: process.env.sitekey || 'NOT_DEFINED',
      };
    },
    appConfig,
    envConfig: config,
    mode: config.env,
    siteConfig: siteConfig,
  },
  app
);

cmsSever.init();

const port = process.env.PORT || 4602;
const server = app.listen(port, () => {
  console.log(`Listening at http://localhost:${port}/api`);
});
server.on('error', console.error);

ENV Variables

PUBLIC_URL= (blank) or deploy url "/module-name/"
API_PREFIX=prefix server for api calls

License

This project is licensed under the terms of the MIT license.

Readme

Keywords

none

Package Sidebar

Install

npm i @qubejs/web-react

Weekly Downloads

106

Version

0.5.0-beta.33

License

none

Unpacked Size

2.46 MB

Total Files

156

Last publish

Collaborators

  • navneetnagpal