
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.
$ npm install --save incense
incense
requires biflora
, and socket.io
.
$ npm install --save biflora
$ npm install --save socket.io
var express = require('express'),
app = express();
var server = require('http').Server(app);
var biflora = require('biflora');
// middleware - biflora resources
app.use( biflora.clientLibs() );
biflora.setupWebSocket(
server,
require('incense').getBifloraApi() ,
require('incense').getBifloraMain({
'dataDir': '/path/to/datadir/', // <- data directory (Read/Write permission required)
'getUserInfo': function( socket, clientDefaultUserInfo, callback ){
// provide user info.
// e.g. {
// 'id': 'user_id',
// 'name': 'User Name',
// 'url': 'http://example.com/',
// 'icon': 'http://example.com/sample.png'
// }
callback(clientDefaultUserInfo);
return;
}
})
);
// middleware - frontend documents
app.use( express.static( '/path/to/htdocs/' ) );
server.listen( 3000, function(){
console.log('message: server-standby');
} );
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>passiful/incense</title>
<!-- incense -->
<link rel="stylesheet" href="./common/dist/incense.css" />
</head>
<body>
<h1>passiful/incense</h1>
<div class="test-wrap">
<div id="testBoardElement"></div>
<div id="testTimelineElement"></div>
</div>
<!-- socket.io -->
<script src="/socket.io/socket.io.js" type="text/javascript"></script>
<!-- biflora -->
<script src="/biflora/biflora.js" type="text/javascript"></script>
<!-- incense -->
<script src="./common/dist/incense.js" type="text/javascript"></script>
<!-- initialize code -->
<script>
window.incense = new Incense();
incense.init(
{
'elmBoard': document.getElementById('testBoardElement'),
'elmTimeline': document.getElementById('testTimelineElement'),
'boardId': 1234567890, // <- discussion board name
'userInfo': {
'id': 'tester', // <- login user id
'name': 'Test User', // <- login user name
'url': 'http://example.com/', // <- login user profile page
'icon': 'http://example.com/sample.png' // <- login user icon
}
},
function(){
console.log('incense standby.');
}
);
</script>
</body>
</html>
#widget.36
のようなハッシュをつけてアクセスすると、ウィジェットにフォーカスした画面からスタートできるようになった。url
と icon
を追加。zoom()
、 getZoomRate()
追加。getUserInfo()
オプション追加Copyright (c)2016 Tomoya Koyanagi, and Passiful Project
MIT License https://opensource.org/licenses/mit-license.php
FAQs
Discussion Board UI.
The npm package incense receives a total of 3 weekly downloads. As such, incense popularity was classified as not popular.
We found that incense demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.