Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
dan-astiak
@dan-astiak
If your api or config folders and subfolders contain any non-source files, they’ll need to be moved. The exception is for Markdown (.md) and text (.txt) files, which will continue to be ignored. Sails will attempt to read all other files in those folders as code, allowing for more flexibility in choosing a Javascript dialect (see the notes about CoffeeScript and TypeScript above).
@mikermcneil Why ? , this just broke my app. I have typescript files that compile to js, and .map.js files why sails need to include non javascript files ? this just makes using sails one impossible and I don't see any benefits of including everything !?
dan-astiak
@dan-astiak
This change doing the opposite of what it says it doesn't make it more flexible it just makes it much harder to use typescript, you assume we use ts-node, but i rather not do that, with sails 0.12 it was simple just compile typescript to js in same folder or and ignore js files in git, now it's either use ts-node or a more complicated setup in typescript compilation.
dan-astiak
@dan-astiak
sigh, tough upgrade lol. new problem : Error: Trying to create an association on a model that doesn't have a Primary Key. I do have this in my model.js though
,
image.png
Marco Romano
@marcorom88_twitter
How can check if session is valid on view? For example: I found this part of code: <%=req.session.authenticated%>, but how can show a link if session is valid on a view?
Osmel Guarepo
@osmelg
Join our Sails Js chat on WhatsApp https://chat.whatsapp.com/AZvYC6uuXbsE716Um97yEw
ivanpetrus
@ivanpetrus
hey all, not sure if it is proper channel, but i have problem, upload file does not work, no error and no files, can anyone help me ?
Juan José González
@jjgonver_twitter
@dan-astiak the comma at the end of the 'id' line is leftover.
dan-astiak
@dan-astiak
@jjgonver_twitter That's a problem in json but doesn't matter in javascript, it is sails generated code anyways
Mike McNeil
@mikermcneil
@swshyamash @brookesb91 re deprecation warning: I haven't been able to reproduce that one-- it's weird-- but I've def. seen it on other folks computers.... I made https://trello.com/c/XYdhhvRc to track this. Looks like it's coming from i18n-2

can you please suggest me how to use sails.io with nativ android ???, or we can use socket.io directy in sails

@mukulsoftwap you can talk to Sails from your android app using socket.io directly, but you'll need to look at the source code of sails.io.js (the browser socket client) so you can emulate it how it's talking to the server. It's worth a google, I remember seeing samples of folks doing this before w/ android -- and the interface between socket client and the server is pretty stable, hasn't had any breaking changes I'm aware of since Sails 0.11, other than upgrading the socket.io-client version to match the version on the server

Mike McNeil
@mikermcneil

hey all, not sure if it is proper channel, but i have problem, upload file does not work, no error and no files, can anyone help me ?

@ivanpetrus that usually means the request didn't go off correctly, in my experience anyway. If you're looking for a req/res kind of thing, check out sails101 for a dated (but still correct) example. If you're on Sails 1.0 and can take advantage of actions2, check out the source code for the Ration example: https://ration.io

Osmel Guarepo
@osmelg
Hello my friends, is there any repo or guide to use sails Js with webrtc? Thank you
Marco Romano
@marcorom88_twitter
If I made a login page with session, how can show username logged on navbar layout?
DevilK
@DevKaranMehta
how to connect sailsjs 1.0 with mongodb (robomongo)
?
i have just install empty app
swshyamash
@swshyamash
I am not able install sailsjs in ubuntu, Already installed nodejs and other dependencies< it gives an error of sprintfjs
?
swshyamash
@swshyamash
can we use sailsjs and angular together?
dan-astiak
@dan-astiak
@mikermcneil Is it impossible to ignore .js.map files in api and config folder ?
Eden Corbin
@edencorbin
@swshyamash yes and yes, you still have an error installing sails?, as for angular yes, I would personally recommend just making it a separate application with its own serve node module, and use sails like a server/api through Angular http library, and not try to have sails serve the angular app, but that is just my preference.
Eden Corbin
@edencorbin
@DevKaranMehta robobmongo is for managing / viewing data and unrelated, but yes for sails with mongo run npm install https://www.npmjs.com/package/sails-mongo, then look in your config dataStores and update default to use mongo driver, should look like this: default: { adapter: 'sails-mongo', host: 'localhost', port: 27017, database: 'yourDB', schema: true }
Mike McNeil
@mikermcneil
@dan-astiak need to loop in @luislobo on this -- it relates to https://www.npmjs.com/package/common-js-file-extensions
@dan-astiak keeping track of this in https://trello.com/c/SIRY6n0A
Mike McNeil
@mikermcneil
@tidusvn05 I answered on SO: https://stackoverflow.com/a/49601419/486547
Mike McNeil
@mikermcneil
and added to unofficial FAQ for future reference:
  1. Best practice Grunt Per-page <script> tags or other HTML code. "how to make view's scripts below layout's scripts" (also includes a bit of explanation of conditionally including robots/nofollow meta tag, Google Analytics, helpdesk chat, etc. based on environment. Also on customizing the linker, vaguely) StackOverflow answer https://stackoverflow.com/a/49601419/486547
Corey Birnbaum
@vonWolfehaus
I know this is stupid but I'm confused by the socketio sails docs. I just want to use es6 imports for the io client in the browser to connect to the sails backend. Which npm package do I use?
Lalit Indoria
@lalitindoria
Does anyone know how to get the relation name in a populate action with blueprints enabled? For example, if I do a /locations/1/menu, I can get the 1 as :parentid but how do I get the menu?
@vonWolfehaus so normally I always just recommend using the global io that's provided out of the box by the default sails.io.js file in new apps, if at all possible. It'll make your life easier. But if that's not an option or it'd be very hard to do (e.g. you're using ReactNative), then it's definitely possible. Here's what I did to get it working in react native: https://github.com/mikermcneil/chatkin/blob/e2837612ed3c75689f66e22efbd571840d999b68/mobileapp/components/index.js#L79-L109
Osmel Guarepo
@osmelg
hi im starting with webrtc, can i see a project of a simple example like two people meeting?anyone?
Mike McNeil
@mikermcneil
@vonWolfehaus In a relatively recent project we did with ionic/the world of angular≥2, it was actually easier-- we were able to just drop the default sails.io.js file in Ionic's "assets" and then access it like this: https://gist.github.com/mikermcneil/2d886a4efbb6efd5b5947a1aff311d46
Mike McNeil
@mikermcneil
@osmelg I haven't used webrtc much myself, but I know it's possible - https://www.respoke.io/ is using Sails
@vonWolfehaus and here's yet another way (without using the io global) that I know for sure works in Angular 4:
// Wrap instantiation of sails.io.js in a module, so it can be safely shared
// required from different modules even if they're nested within each other.
var io = require('sails.io.js/sails.io.js')(require('socket.io-client/dist/socket.io.js'));
module.exports = io;
@vonWolfehaus but again-- by far the best way IMO is just to use the default, bundled client and rely on the io global available on the window
(that way, your team can save the energy/productivity/creativity you'd spend messing with the build/tooling, and can spend it somewhere else instead)
Osmel Guarepo
@osmelg
@mikermcneil let me check it, thank you crack!
John Wolfe
@wolfejw86
is there any documentation around setting up a self-signed ssl cert with sails for local development? facebook just implemented a new policy with their social login that prevents testing fb login on http, it only works on https
Corey Birnbaum
@vonWolfehaus
@mikermcneil That's useful info, thank you for the recommendation. Then I'll try to find the sailsio for the version of sails I'm using (I didn't think I'd use it and got rid of it because I'm an idiot hahah) and just use the global. Cheers!
Thomas Lepérou
@tleperou
@wolfejw86 check this out
Then, generate your key openssl genrsa -out path/to/save/the/key 2048
nishantpradhan
@nishantpradhan
hi
dan-astiak
@dan-astiak
@mikermcneil Adding |ts|map to all occurrences of filter inside these 2 files solved my problem but that means I have to do this for all npm install and after every update
files are : sails/lib/hooks/moduleloader/index.js
and
sails/lib/app/private/controller/local-action/modules.js