Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
generator-simple-reactapp-gulp
Advanced tools
Simple generator for creating ReactApp
yeoman: http://yeoman.io/
react: https://facebook.github.io/react/
redux: http://redux.js.org/
The generator includes a framework Hapi
const Hapi = require('hapi');
const Inert = require('inert');
const Vision = require('vision');
const Handlebars = require('handlebars');
const path = require('path');
const logger = require('pino')();
// routes
const routs = require('./routes');
const server = new Hapi.Server();
server.connection({
port: process.env.PORT || 5000,
routes: {
cors: true,
},
});
server.register([Inert, Vision], () => {});
server.views({
engines: { html: Handlebars },
path: path.resolve(__dirname, './templates'),
});
server.route(routs);
server.start((err) => {
if (err) {
throw err;
}
logger.info('Server running at:', server.info.uri);
});
routes
module.exports = [
{
method: 'GET',
path: '/js/{param*}',
handler: {
directory: {
path: './public/js',
redirectToSlash: true,
index: true,
},
},
},
{
method: 'GET',
path: '/css/{param*}',
handler: {
directory: {
path: './public/css',
redirectToSlash: true,
index: true,
},
},
},
{
method: 'GET',
path: '/img/{param*}',
handler: {
directory: {
path: './public/img',
redirectToSlash: true,
index: true,
},
},
},
{
method: 'GET',
path: '/fonts/{param*}',
handler: {
directory: {
path: './public/fonts',
redirectToSlash: true,
index: true,
},
},
},
{
method: 'GET',
path: '/media/{param*}',
handler: {
directory: {
path: './public/media',
redirectToSlash: true,
index: true,
},
},
},
{
method: 'GET',
path: '/{path*}',
handler: (request, reply) => {
reply.view('index');
},
},
];
yo simple-reactapp-gulp
npm start
npm run build
npm run buildContainer
FAQs
Simple generator for creating ReactApp
The npm package generator-simple-reactapp-gulp receives a total of 1 weekly downloads. As such, generator-simple-reactapp-gulp popularity was classified as not popular.
We found that generator-simple-reactapp-gulp 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.