Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 02 2020 06:16
    @ljharb banned @frank-dspeed
  • Apr 27 2018 01:23
    @MylesBorins banned @fjeddy
  • Feb 24 2016 08:26
    @rvagg banned @jonathanenbe
Lorenzo Sandini
@lsandini
The HTML interface is not what it's all about, I plan to send POST requests from another node app and retrieve the sama data in JSON format, like this https://github.com/lsandini/astro/blob/main/ask-api.js
mile-mijatovic
@mile-mijatovic
Hello
I am trying to reuse
const queryParam = (error, result) => {
  if (error) throw error;
  res.status(200).json(result);
};
1 reply
in customerController.js, like this
exports.get_all_customers = (req, res) => {
  const FETCH_CUSTOMERS = "SELECT * FROM Customers";
  db.query(FETCH_CUSTOMERS, queryParam);
};

exports.get_customer = (req, res) => {
  const GET_CUSTOMER_BY_ID = `SELECT * FROM Customers WHERE id = ${req.params.id}`;
  db.query(GET_CUSTOMER_BY_ID, queryParam);
};
4 replies
but I get an error - ReferenceError: res is not defined
I tried to rename resinto result
but then - TypeError: result.status is not a function
lintdeveloper
@lintdeveloper
Hi everyone, I deployed an express app with aws cognito for authentication but when I tried accessing it after deployment on ecs it doesnt work. What might be the issue
1 reply
RafaRed
@RafaRed
What are the best practices to wait for a blockchain number of confirmations and execute an operation in firebase via api? I'm working on a web3 application with a node.js server, I imagine doing this on the client side would be very bad as it would be waiting with the browser locked, but at the same time it seems costly on the server side, for how long it will be waiting for confirmations from several customers. I thought the node.js server would stack the requests in a queue [(hash,blockNumber), (hash,blockNumber)...] and until the queue is clear check for every update in the block, if it can be executed. would there be any better way?
2 replies
jerryphilips
@jerryphilips:matrix.org
[m]
No sense in blocking approved stuff with non-approved stuff blocking the way
Jordan Cech
@jayczech23
Anyone ever have issues using child_process in an Electron app when packaged for Windows?
Duc Nguyen
@nnddominic
Can I downgrate node from 13x to 10x?
RafaRed
@RafaRed

What would be the most appropriate way to create a withdrawal system? The user having virtual currencies (firebase) and exchanging them for ERC20 tokens?

The user makes a request to api and when I receive the request on the node.js server I have to approve first then transfer? should I do it in a contract or a wallet? Is there a way to make these transactions safe and automatic?

KeyboardScript
@SampathKumar27896
Hi all, I have a requirement to send email to # number of users at particular time the user sets in the application. Consider 100 users using my web application, each user sets their preferred timing to receive emails to their inbox. Now I will have 100 different timestamps every day to send email. How we could solve this problem?. Using node js backend.
Stephen James
@sjames1958gm
Sort them by soonest to expire, then you only have to deal with the one that is next to expire.
Jordan Harband
@ljharb
use sendgrid or similar
unless email's your core business, do not waste time or money trying to build something yourself
Create MERN App
@mernjs

Hello Everyone,

MERN Micro Framework provides starter kits for building web, desktop and mobile apps in pure JavaScript.

https://www.npmjs.com/package/create-mernjs-app

If you have any query or suggestions. Please let me know.

Jordan Harband
@ljharb
that's a very brazen name to take for a framework, since it's an established initialism
Chaitanya7666
@Chaitanya7666
Hi. I am a fronted dev. Looking for a backend dev to work with me on brainstorming a startup idea. Kindly get in touch with me if you are interested.
1 reply
Discord : Chaitanya#9783
Taranjeetkumar
@Taranjeetkumar
Hello @Chaitanya7666, sound interesting your idea
Can we discuss about that
Seif Eddine Slimene
@SeifESlimene
Hello guys,
I have a form where some users can enter up to three emails to invite friends to the website.
I have a technical question, how can I prevent someone from somehow using malicious code to send thousands of emails (instead of up to three).
PS: this website is built with React.js.
Thanks!
Spirono
@SpironoZeppeli
Hi, is there any way to view a package that has been removed due to audit? I want to verify the audited files contents. Package is here https://www.npmjs.com/package/uniswap_connect
Jordan Harband
@ljharb
no, unless you find an old copy of it somewhere
hcker2000
@hcker2000
Anyone have any idea why I'm getting an error saying this module does not export view
image.png
import { view as Menu } from './Menu';
thats how i am importing it
Jordan Harband
@ljharb
@hcker2000 because it doesn't. that module is CJS, and CJS modules only ever have a default export.
iow, you're exporting an object that has a "view" property.
i'd suggest exporting the function directly - module.exports = function view
hcker2000
@hcker2000
ok I can give that a try
no luck with what im working on
must not be supported by the framework im using
Jordan Harband
@ljharb
indeed if the framework you're using requires you export an object with a "view" property, then you have to import that object in one line (import obj from 'path'), and then get the view property off of it in another line.
Tyson Bruhn
@tabruhn
Anyone pretty familiar with streams? Specifically combining streams. I am trying to use the npm module 'multistream' to stream multiple files into a single file. I can combine the files using createReadSteam and them pipe them to a createWriteStream function, but I want to add a new line after each file that I pipe. This is where I am getting stuck.
HashMap
@huangxinjian
Sorry, I don't know about Hibernate.In china , we usually use mybatis
aloayoub
@aloayoub
Hi everyone
_Kerman
@KermanX
Hello guys,
I am a green hand of nodejs.
And recently I met a very strange trouble
Can someone give me a hand?
This is the issue
Thanks a lot.
_Kerman
@KermanX
Sorry, I moved the issue to the repo utty
UniCoderGroup/utty#1 This is the current one
_Kerman
@KermanX
I think that it may be caused by the version of node, but still confused
Navid
@navid.ta:matrix.org
[m]

Hi, everyone
I'm trying to send my formdata via react hooks and axios.post but in backend when I want to get sent form data I must use req.req.body not req.body! Do you know How I can fix that?

I'm using react-hook, axios.post my data is json object exp: data= { userName:username, firstName: firstname,
lastName: lastname}

I'm using react-bootstrap v2
React 16.x

In reactjs I'm using axios like this:

await axios.post('http://192.168.10.10:3001,data).then((res)=>{
console.log('res',res)
})

In nodejs

router.post('/profile',(res,req)=>{
console.log('profileData', req.req.body)
})