
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@zalando/zally-web-ui
Advanced tools
The project provides a simple web user interface client for Zally Rest API, a tool to lint your api specs.
It's implemented as an express app/middleware and a Single Page Application based on React.
npm install zally-web-ui --save
or
yarn add zally-web-ui
const app = require('zally-web-ui')();
app.listen(3000, () => {
console.log('zally-web-ui running at http://localhost:3000');
});
const app = require('express')()
const zally = require('zally-web-ui')(/*options*/);
app.use('/api-linter', zally);
app.listen(3000, () => {
console.log('server running at http://localhost:3000');
});
When instantiating the app you can pass an options
object to customize the behavior.
const options = { /* ..my options.. */}
const zally = require('zally-web-ui')(options);
object
contains all the values exposed to the client on window.env
false
): enable OAuth or just Auth support on the client side (an http call will be fired on /auth/me
endpoint to get the current logged in user, if any)http://localhost:8080
): URL pointing to Zally REST APItrue
): logs debugging message on the client sideconsole
): custom loggerobject
contains all route handlers used by zally-web-ui/env.js
javascript file used to expose windowEnv
values to the client on window.env
*
to allow HTML5 History API working as expectedTo add authentication the express server serving zally-web-ui MUST implement some REST API JSON endpoints and set windowEnv.OAUTH_ENABLED
to true
.
Should respond back with 200
http status code and a json response containing the current connected user in this format:
{
"username": "John Doe",
"authenticated": true
}
Or with 401
http status code if the user is not connected
To show a login or redirect to an external login (if for example you are using some OAuth Provider)
To logout the user (for example clearing the session, etc.)
Optionally implement this endpoint to refresh an expired token (if for example you are using some OAuth Provider that support this feature)
A Zally Rest Api server MUST be running on your local machine or somewhere over the network.
UsewindowEnv.ZALLY_API_URL
configuration option to set the desired value.
yarn
yarn dev
The
yarn dev
task starts the application server in development mode with nodemon and webpack-dev-server watching for changes.
The application server acts as a proxy to webpack-dev-server as the target.
yarn build
yarn start
Build webpack bundle minified and source-map file(s).
yarn build
web-ui-release-1.1
)
package.json
npm login && npm publish --access=public
)People interested contributing to the web-ui project can open issues and related pull requests.
Before opening PRs, be sure the test are running by executing yarn test
.
Feel free to contact one the maintainers
MIT license with an exception. See license file.
FAQs
Zally API Linter Web UI
The npm package @zalando/zally-web-ui receives a total of 1 weekly downloads. As such, @zalando/zally-web-ui popularity was classified as not popular.
We found that @zalando/zally-web-ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.