Socket
Socket
Sign inDemoInstall

resolve-scripts

Package Overview
Dependencies
Maintainers
1
Versions
708
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resolve-scripts

This package create server with resolve.


Version published
Weekly downloads
2
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

resolve-scripts

Create resolve application with minimal configuration.

There are three configuration files. All of them must be placed in the root directory of your application.

Additional settings are provided by environment variables.

resolve.client.config

This file contains information for client side of your application.

* rootCopmonent

ReactElement

Contains root component that will be rendered on client side.

createStore

function(initialState: Object): store

Function that takes initialState and returns redux store. Initial state will be takken from server side and it defines in resolve.server.config.js

resolve.server.config

This file contains information for SSR and resolve library.

aggregates

Array

Array of aggregates for resolve-command.

bus

Object

Contains config for resolve-bus-drivers.

entries

createStore

function(initialState: Object): store

Function that takes initialState and returns redux store. Initial state will be takken from server side and it defines in resolve.server.config.js

rootComponent

ReactElement

Contains root component that will be rendered on server side.

events

Object

List of events.

extendExpress

function(req, res, next)

It's possible to define there custom routes and write express middleware.

initialState

function(query): Promise

Function that takes a query and returns a Promise. It's possible to get initial state by query to read-model and then resolve it with Promise.

queries

Array

Array of read models for resolve-query.

storage

Object

Contains config for resolve-storage-driver.

resolve.build.config

extendWebpack

function(clientConfig, sererConfig)

It's a function where is possible to extend standart resolve client and server configs.

ROOT_DIR

To change root directory of an application set the environment variable ROOT_DIR to needed value. For example export ROOT_DIR=/newurl. After that application will be available by http://localhost:3000/newurl. ROOT_DIR variable will be available on client side by process.env.ROOT_DIR.

ENV variables

It is possible to pass env variable to client side. For this define variable with RESOLVE_ prefix. After that variable will be available on client and on server side by process.env.

Keywords

FAQs

Package last updated on 18 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc