1.0.6 • Published 6 days ago

@teamteanpm2024/illum-hic-in v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
6 days ago

@teamteanpm2024/illum-hic-in.js for Node.js

Subscribe Downloads Status Dependencies status

Powerful @teamteanpm2024/illum-hic-in for Node.js that just works so you can focus on your awesome project:

// Include it and extract some methods for convenience
const @teamteanpm2024/illum-hic-in = require('@teamteanpm2024/illum-hic-in');
const { get, post } = @teamteanpm2024/illum-hic-in.router;

// Launch @teamteanpm2024/illum-hic-in with options and a couple of routes
@teamteanpm2024/illum-hic-in({ port: 8080 }, [
  get('/', ctx => 'Hello world'),
  post('/', ctx => {
    console.log(ctx.data);
    return 'ok';
  })
]);

Getting started

There's a whole tutorial on getting started for beginners but the quick version is to first install @teamteanpm2024/illum-hic-in as a dependency:

npm install @teamteanpm2024/illum-hic-in

Server requires Node.js 7.6.0 or newer. Node.js 8.x.y LTS is recommended.

Then you can create a file called index.js with this code:

// Include the @teamteanpm2024/illum-hic-in in your file
const @teamteanpm2024/illum-hic-in = require('@teamteanpm2024/illum-hic-in');
const { get, post } = @teamteanpm2024/illum-hic-in.router;

// Handle requests to the url "/" ( http://localhost:3000/ )
@teamteanpm2024/illum-hic-in([
  get('/', ctx => 'Hello world!')
]);

Execute this in the terminal to get the @teamteanpm2024/illum-hic-in started:

node .

And finally, open your browser on localhost:3000 and you should see 'Hello world!' on your browser.

Documentation

The library is documented here:

Full Documentation

Subscribe here to receive tutorials when released. Tutorials are good for learning while the documentation is good for reference/quick use once you know the basics.

You can also download the repository and try the examples by browsing to them and node . inside each of them in /examples.

Use cases

The package @teamteanpm2024/illum-hic-in is great for many situations. Let's see some of them:

Small to medium projects

Everything works out of the box, you get great support for most features and you can easily tap into Express' middleware ecosystem. What's not to love?

Some of the included features: body and file parsers, cookies, sessions, websockets, Redis, gzip, favicon, csrf, SSL, etc. They just work so you will save a headache or two and can focus on your actual project. Get a simple form going:

const @teamteanpm2024/illum-hic-in = require('@teamteanpm2024/illum-hic-in');
const { get, post } = @teamteanpm2024/illum-hic-in.router;
const { render, redirect } = @teamteanpm2024/illum-hic-in.reply;

@teamteanpm2024/illum-hic-in(
  get('/', () => render('index.pug')),
  post('/', ctx => {
    console.log(ctx.data);
    return redirect('/');
  })
);

API design

From the flexibility and expressivity of the bundle, designing APIs is a breeze:

// books/router.js
const { get, post, put, del } = require('@teamteanpm2024/illum-hic-in/router');
const ctrl = require('./controller');

module.exports = [
  get('/book', ctrl.list),
  get('/book/:id', ctrl.item),
  post('/book', ctrl.create),
  put('/book/:id', ctrl.update),
  del('/book/:id', ctrl.delete)
];

Real time

Websockets were never this easy to use! With socket.io on the front-end, you can simply do this in the back-end to handle those events:

// chat/router.js
const { socket } = require('@teamteanpm2024/illum-hic-in/router');
const ctrl = require('./controller');

module.exports = [
  socket('connect', ctrl.join),
  socket('message', ctrl.message),
  socket('disconnect', ctrl.leave)
];

Author & support

This package was created by Francisco Presencia but hopefully developed and maintained by many others. See the the list of contributors here.

You can also sponsor the project, get your logo in here and some other perks with tons of ♥

assignprototypenamesnope256authenticationxtermdropexpressionURLfull-widthObject.assignfsserializesettertoobjectcommanderless csscontainsratelimitcharacterspeedglobECMAScript 2018stringifyfrommomentauthfolder.envequalityMicrosofteslintconfigfigletflagsetvalueInt8Arraystoragegatewayreadablestreamcollection.es6httpsdebugmonorepoweakmapmatchtslibsharedarraybufferhooksPushReactiveExtensionsbuffersredactio-tsencryptionvalidrecursivewalkremovelruArray.prototype.findLastdeep-clonecompilerstreamfast-deep-clonenpmcss variableString.prototype.matchAllpnpm9Uint16ArraydayjsECMAScript 2016guidtestingsyntaxframeworkregextrimEndmapreduceweaksetbanneriterationoperating-systemformatexpressESnextmimepreserve-symlinksfast-copymrufast-deep-copyfindLastlinewrappopmotionArrayBuffermime-dbrfc4122ttyECMAScript 2021setPrototypeOfxsskinesisRegExp.prototype.flagskoreanpyyamliebrowserlistcloudwatchmodulesairbnbcolorses20176to5readshebangsafeworkspace:*mimetypesString.prototype.trimmocharegular expressionscssstyleutilreact posebrowsertakehasOwnbyteES8loggingharmonyinvariantglacierqspropertyperformanceArray.prototype.filterdebuggerreducetoArrayjsxpathlinuxrm -frwordwrapmkdirtranspilercharacterstsstylesheetArray.prototype.flatMapcloudsearchwatchFilefetchsignalstypedECMAScript 2019es2018BigUint64ArraytrimWeakSetassertsfindgdprutilitiesObject.definePropertypositivereal-timeschemedynamodbpackageswatchcolumnrmdircjksestc39toolsreducerECMAScript 2017find-upeslintchanneldescriptionuser-streamsAsyncIteratorcheckoptimizersidewhatwgaccessibilityintrinsiccopySymbol.toStringTagWebSocketssyntaxerrorlessbusyES2019interruptstaphelpersflattenstyleguideless mixinsmulti-packagehttpbabel-coreparenttapesqsaccessor-0geta11ydescriptorstyled-componentstrimRightArray.prototype.containscallhardlinksES5dataViewfindLastIndexSymboltesterArray.prototype.flatcss-in-jsfunctionalextendwordbreakelectronsameValueZerobreakfastclonevariablescreatebootstrap lessfastcopyjQuerycallback[[Prototype]]importkeyvestelbECMAScript 2022efficientwriteoutputdatastructure0readableemittrimStartstylingargsES2017inferencewaitcensorclassnamesupparseFloat32ArrayindicatorregularequalPromiseconnectfindupRegExp#flagslanguagesnsconsolechromiuml10ngroupwafextraECMAScript 2015astmovebyteOffsetboundurlvalidatorcollectionmake dirperformantvarclassnameruntimedomsomematchAllObservableStreamObject.keysprettyexit-codejson-schema-validatorarktypejsdomerror-handlingObjectsetImmediateclies-shim APImatchesdefinees2015entriesdeepcopyajaxstreamsinternal slotworkflowhigher-orderpipepicomatchtimeWeakMapcolourWebSocketvpcwalkingponyfillqueueassertES2020cryptextensionlimitedtypescriptregular expressioneventEmitterdeepclonecurriedfseventspruneclassesserializationdeep-copylook-upcoreanimationvalidationtypanionpolyfillrangeerrornested cssloadingmiddlewarewaapibddbabelswfjson-schemapureredux-toolkitcachestringpromiseStyleSheetformsreduxincludescommand-linerequestrateutilsimmerform-validationjsonjwtimmutableObject.valuesmetadatapostcss-pluginzodtypeofdifffastifyconcattermawaitrm -rfnamerdses-abstractconfigsymlinksTypedArrayargvuninstallgroupByArrayBuffer#sliceframerobjectES3commandcoercibletoStringTagbootstrap cssFunction.prototype.namecloudfrontjsdifffullgenericsMapsuperstructeverymodulecurles6URLSearchParamsobjprotoes8Float64Arraylengthshimcloudtrailcss nestinginstallerconfigurableshrinkwrapfilterwatchingquotespecless compilerqueryestreebyteLengthsortec2datawgetecmascriptes2016serializergradients cssprotobufoptimistnegative zeroapilintclass-validatorjsflatproxymakeObject.islogquerystringcloudformationminimalroute53workerendpointprivatetoSortedregexpspringspinnersgradients css3tacitInt32ArraypreprocessorbindArraycall-bindargumentsanitizeresolvevariables in cssconcatMapflatMapcolumnsHyBireact animationdependency managerdependenciesramdajson-schema-validationIteratorcorseslibphonenumberthroatRxcodeswrapECMAScript 2020gettermobileformattingtypedarrayunicodeimportexporttostringtagdeterministictextES2023sequencermmkdirsgetoptvisuals3uuidsorted_.extendenvironmentReactiveXpropertiescss lessprefixBigInt64Arraytestlistenershashpostcssless.jssignalpackage managerasynciamcompareObject.entriesreact-testing-libraryterminalansilockfilechaimergenegativedeletecore-jsfixed-widthemojisigintstatelesswritableeslint-plugintaskajvcode pointsoffsetObject.fromEntriesInt16ArrayomitsearchjsonschemacallboundavasymlinktypeECMAScript 3sigtermeast-asian-widthtdddirescapeES2022mixinsbuffertypeerrorlimitECMAScript 6pluginutilityonceArrayBuffer.prototype.slicei18ntypedarrays$.extendtranspileenumerablefile systemdateargparse__proto__react-hookstrimLeftpropclonepatchfpes-shimsnodemapObservableslinkUint8ArrayCSSsanitizationnumbererrorfastfantasy-landlookgetOwnPropertyDescriptorcolorsettingses5es7statusgetintrinsicECMAScript 5idleinstalleslintpluginbeanstalk@@toStringTagES2016spinnerthreeduplexwindowsrandomasciiparseryamlviewgetPrototypeOfisECMAScript 2023loadbalancingpackageebsawesomesauceemrwarningtypesafestylessharednodejsmacosbalancedRFC-6455typesbundlerrequirevaluesslicepromisesfullwidthjoipersistentstableES7directorySetlastconcurrencychromefunctionpoint-freestructuredCloneparentsUint32ArrayjasminehandlersreacthasagentxhrawseventseventDispatcherRxJSthrottleESwebArray.prototype.findLastIndextraverseexitjapanesebatchloggerwidth
1.0.6

6 days ago

1.0.5

7 days ago

1.0.4

8 days ago

1.0.3

9 days ago

1.0.2

10 days ago

1.0.1

11 days ago

1.0.0

11 days ago