对不起,对不起,但是我想知道我在构建Next.js应用程序时API逻辑应该放在哪里吗?
在构建SPA + API时,我通常有两个不同的应用程序:一个用于API,一个用于SPA。
我是否也应该将Next.js应用程序与我的其余API应用程序分开?在示例中,我看到他们在Undefined symbols for architecture x86_64:
"Chain<int>::insertNode(int, int const&)", referenced from:
_main in main.o
"Chain<int>::~Chain()", referenced from:
_main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
文件夹内的api/ folder
中添加了一些逻辑。那么,我应该在那里写所有我的支持逻辑吗? (我还应该在那里为数据库连接和其他内容编写逻辑吗?)
感谢您的澄清。