A
A
Alex102142021-08-30 13:35:33
Node.js
Alex10214, 2021-08-30 13:35:33

How to transfer from Node.js to a Python script?

Greetings, I have a task:
Pass a new user object to a python script, if all the keys in the object match the requirements, then the script will return "OK", if not, it will return a certain error.
I don't know why, but here's my web server just in case:

const cors = require('cors');
const express = require('express');
const path = require('path');
const app = express();
const bodyParser = require('body-parser');
const sequelize = require('./database/database')

const getUsersFromAccounts = require('./routes/getUsersFromAccounts')


app.use(cors());

app.use(express.static(path.join(__dirname, 'dist')));
app.use(express.json());
app.use('/getUsersFromAccounts', getUsersFromAccounts);

app.get('*', (req, res) => {
  res.sendFile(path.join(__dirname, 'dist/aat/index.html'))
});

const port = process.env.PORT || 4000;

async  function start() {
  try {
    await sequelize.sync()
    app.listen(port, (req, res) => {
      console.log(`Server running in port ${port}`);
    })
  } catch (e) {
    console.log(e);
  }
}
start();

I understand that I need to make a post request and pass data to the script in the controller, but I don’t understand how it is written correctly. Can someone share some useful info? I use sequelize.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2014-07-18
@Awake

And what is the question? Download the slider, take css and get what you need.

R
RGoldvarg, 2014-07-18
@RGoldvarg

The question is that I would like to use a "ready-made solution", if possible with minimal edits. The matter is that I now poorly represent how to make so that the black border under the text changed, depending on the size of the text. +
UP. Found a pretty similar slider, downloaded it. w3layouts.com/blog-magazine-flat-responsive-web-mo...
But for the life of me... I can't figure out where the height is adjusted... I rummaged through all the files and searched everything with a firebug, I can't find it =(

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question